Stop the rc unit failing before the first RC is cut
The rc service fetched and reset /root/omarchy-pkgs-rc in ExecStartPre, but that worktree does not exist until the first RC creates the rc branch — so on a freshly set up host the unit failed every five minutes, forever, and showed up as a failed unit in the timer report. It now runs bin/auto-release-rc from the main checkout, which always exists: nothing queued exits silently, no rc branch is a clean no-op, and a missing worktree is created on demand before handing off to the worktree's own auto-release.
This commit is contained in:
@@ -5,13 +5,11 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
# The rc channel builds from the rc branch worktree, but publishes into the
|
||||
# primary checkout's channel tree via OMARCHY_REPO_ROOT. The rc branch is
|
||||
# rebuilt (master + pin commits) each release train and force-pushed, so this
|
||||
# worktree follows with a hard reset rather than a fast-forward pull.
|
||||
ExecStartPre=/usr/bin/git -C /root/omarchy-pkgs-rc fetch origin rc
|
||||
ExecStartPre=/usr/bin/git -C /root/omarchy-pkgs-rc reset --hard origin/rc
|
||||
ExecStart=/bin/bash -c 'source /root/.omarchy/build-credentials && /root/omarchy-pkgs-rc/bin/auto-release rc'
|
||||
# Runs from the main checkout: bin/auto-release-rc creates and syncs the rc
|
||||
# branch worktree itself, so a host with no rc branch yet is a no-op instead
|
||||
# of a unit that fails every five minutes. Builds happen in the worktree but
|
||||
# publish into the primary checkout's channel tree via OMARCHY_REPO_ROOT.
|
||||
ExecStart=/bin/bash -c 'source /root/.omarchy/build-credentials && /root/omarchy-pkgs/bin/auto-release-rc'
|
||||
Environment=OMARCHY_STATE_DIR=/root/.state
|
||||
Environment=OMARCHY_REPO_ROOT=/root/omarchy-pkgs/pkgs.omarchy.org
|
||||
TimeoutStartSec=7200
|
||||
|
||||
Reference in New Issue
Block a user