mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 05:09:58 -05:00
Greptile (PR #448): - C1 (P1): release-watch.sh compared the GitHub tag (minus 'v') against the manifest's .version (from version.txt content). If a tag and its version.txt ever diverged, the guard never matched and it rebuilt every hour forever. Compare the manifest's .tag against the release tag directly -- exact and immune to version-string formatting. Drops the now-unused normalize(). - C2 (P2): document that .tag is the built git ref (release tag for automated builds, branch for manual) and that consumers use .version for display. - C3 (P2): document that newest-by-publish-date is the intended trigger and that prereleases are deliberately included (every release is -beta), so we do not filter on .prerelease as suggested. Also add an optional completion notify hook: release.sh invokes $WROLPI_RELEASE_NOTIFY with a success/failure message (no-op if unset, skipped on dry-run). The public script names no path or tool; the real notifier stays on the host (commented Environment= placeholder in the service unit). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35 lines
1.5 KiB
Desktop File
35 lines
1.5 KiB
Desktop File
# WROLPi release poller (oneshot, driven by wrolpi-release.timer).
|
|
#
|
|
# Checks GitHub for a newly-published release and builds + publishes it.
|
|
# This is OUTBOUND polling only -- GitHub never connects to this machine.
|
|
#
|
|
# Install (as root):
|
|
# cp release/wrolpi-release.service release/wrolpi-release.timer /etc/systemd/system/
|
|
# # edit paths/user below to match this host, then:
|
|
# systemctl daemon-reload
|
|
# systemctl enable --now wrolpi-release.timer
|
|
#
|
|
# The builds need root (chroot), so this runs as root. s3cmd therefore reads
|
|
# /root/.s3cfg by default -- either place the Spaces credentials there or point
|
|
# S3CFG at another location below.
|
|
|
|
[Unit]
|
|
Description=WROLPi release poller (build & publish new GitHub releases)
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
# Adjust to wherever the WROLPi repo lives on this host (production: /opt/wrolpi).
|
|
WorkingDirectory=/opt/wrolpi/release
|
|
ExecStart=/opt/wrolpi/release/release-watch.sh
|
|
# Persistent state (failure markers, build lock): /var/lib/wrolpi-release
|
|
StateDirectory=wrolpi-release
|
|
Environment=STATE_DIR=/var/lib/wrolpi-release
|
|
# Uncomment if the s3cmd config is not at /root/.s3cfg:
|
|
#Environment=S3CFG=/home/wrolpi/.s3cfg
|
|
# Optional: command to notify on release success/failure (gets one message arg).
|
|
# Keep the real path here on the host -- it is intentionally not in the repo.
|
|
#Environment=WROLPI_RELEASE_NOTIFY=/home/wrolpi/bin/notify
|
|
# A full release builds two images and can run for hours.
|
|
TimeoutStartSec=0
|