diff --git a/ci/build-docs.sh b/ci/build-docs.sh index 52b959926..851e8a444 100755 --- a/ci/build-docs.sh +++ b/ci/build-docs.sh @@ -1,6 +1,8 @@ #!/bin/bash +set -x [[ -f /tmp/wezterm.releases.json ]] || curl https://api.github.com/repos/wez/wezterm/releases > /tmp/wezterm.releases.json +[[ -f /tmp/wezterm.nightly.json ]] || curl https://api.github.com/repos/wez/wezterm/releases/tags/nightly > /tmp/wezterm.nightly.json python3 ci/subst-release-info.py || exit 1 python3 ci/generate-docs.py || exit 1 mdbook build docs diff --git a/ci/subst-release-info.py b/ci/subst-release-info.py index 15578336f..d4136cd0a 100755 --- a/ci/subst-release-info.py +++ b/ci/subst-release-info.py @@ -65,12 +65,16 @@ def load_release_info(): with open("/tmp/wezterm.releases.json") as f: release_info = json.load(f) - latest = release_info[0] - nightly = None + with open("/tmp/wezterm.nightly.json") as f: + nightly = json.load(f) + + + latest = None for rel in release_info: - if rel["tag_name"] == "nightly": - nightly = rel - break + if rel["prerelease"]: + continue + latest = rel + break latest = categorize(latest) nightly = categorize(nightly)