aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-02-10 12:49:06 -0600
committerChristian Cleberg <[email protected]>2026-02-10 12:49:06 -0600
commite0c7db7541d5f7a00cbfe0b2beb4282989f66a44 (patch)
tree1d459a06355ea9435013d8abce93074389c97ddc /build.py
parentb417650dbea1f766322b284ed7a780cb80fe6503 (diff)
downloadcleberg.net-e0c7db7541d5f7a00cbfe0b2beb4282989f66a44.tar.gz
cleberg.net-e0c7db7541d5f7a00cbfe0b2beb4282989f66a44.tar.bz2
cleberg.net-e0c7db7541d5f7a00cbfe0b2beb4282989f66a44.zip
implement GitLab CI
Diffstat (limited to 'build.py')
-rw-r--r--build.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/build.py b/build.py
index d58d683..3e9affd 100644
--- a/build.py
+++ b/build.py
@@ -253,19 +253,22 @@ def run_emacs_publish(dev_mode=True):
print("Running Emacs publish script (production)...")
result = subprocess.run(
["emacs", "--script", "publish.el"],
- stdout=subprocess.DEVNULL,
- stderr=subprocess.DEVNULL,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
text=True,
)
- # Fix to remove annoying cleberg-net.html file
- os.remove(".build/cleberg-net.html")
-
if result.returncode != 0:
print("Error running publish.el:")
print(result.stderr, file=sys.stderr)
sys.exit(1)
+ annoying_file = Path(".build/cleberg-net.html")
+ if annoying_file.exists():
+ os.remove(annoying_file)
+ else:
+ print("Warning: .build/cleberg-net.html not found, but Emacs exited successfully.")
+
def generate_sitemap(build_dir=".build", base_url="https://cleberg.net"):
"""