Files
jasp-desktop-bin/scripts/record-state.sh
T
agw 0d4db32d5c
Build JASP binary and publish to AUR / check (push) Successful in 10s
Build JASP binary and publish to AUR / build (push) Failing after 12s
Automated Arch binary builds of JASP for the AUR
Upstream JASP ships no Linux binary, so the existing AUR package builds
everything from source including several hundred R packages. This builds
that once in CI and publishes the result as jasp-desktop-bin.

JASP links against the system R and Qt6 rather than bundling them, so a
rebuild is triggered by an Arch r/qt6-base bump as well as by a new JASP
release, and the generated PKGBUILD pins depends to the versions actually
built against.
2026-09-01 20:30:00 +02:00

46 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Commit state.json back to this repo so the next scheduled run knows what was
# already built. Without this the daily check would rebuild every night.
#
# GITEA_TOKEN token with write access to this repo (required)
set -euo pipefail
: "${GITEA_TOKEN:?GITEA_TOKEN is required}"
python3 - <<'PY'
import json
meta = json.load(open("release-meta.json"))
state = {
"jasp_tag": meta["jasp_tag"],
"jasp_version": meta["jasp_version"],
"pkgrel": meta["pkgrel"],
"r_minor": meta["r_minor"],
"qt6_minor": meta["qt6_minor"],
"sha256": meta["sha256"],
"download_url": meta["download_url"],
}
with open("state.json", "w") as fh:
json.dump(state, fh, indent=2)
fh.write("\n")
print(json.dumps(state, indent=2))
PY
if git diff --quiet -- state.json; then
echo ":: state.json unchanged"
exit 0
fi
git config user.name "jasp-bin autobuilder"
git config user.email "noreply@weircon.dk"
git add state.json
git commit -m "Record build of ${GITHUB_REF_NAME:-build}: $(python3 -c 'import json;print(json.load(open("state.json"))["jasp_version"])')"
origin="$(git remote get-url origin)"
host_path="${origin#*://}"
host_path="${host_path#*@}"
git push "https://x-access-token:${GITEA_TOKEN}@${host_path}" HEAD:"${GITHUB_REF_NAME:-master}"
echo ":: state recorded"