Files
omarchy-pkgs/bin/upload-prebuilt
T
Ryan Hughes 63f6156f25 Replace migrate with manifest-driven advance-channel and add the release lock
bin/repo advance --from/--to moves packages forward through the pipeline
(edge → rc → stable), driven by the source channel's database rather than the
raw directory, copying packages AND their detached signatures (fixing the old
migrate bug that left promoted packages unverifiable), refusing to rewrite any
published filename, and requiring a .sig for everything it moves. stable → rc
is allowed only as --fast-ring parity replication or the one-time
--bootstrap seed (bin/repo bootstrap-rc). 'migrate' stays as a deprecated
alias for the transition.

helpers/lock-helpers.sh adds a host-wide flock shared by bin/release,
advance-channel, and upload-prebuilt (reentrant via OMARCHY_RELEASE_LOCK_HELD)
so timers and operators serialize instead of interleaving partial publishes.

bin/release gains a stable-only step 7: replicate fast-ring artifacts to rc so
rc and stable stay in parity between release trains (skipped until rc is
bootstrapped).
2026-08-27 01:10:33 -04:00

38 lines
883 B
Bash
Executable File

#!/bin/bash
# Upload prebuilt packages: sign → promote → update → sync
set -e
SCRIPT_DIR=$(realpath "${BASH_SOURCE[0]%/*}")
BUILD_ROOT=$(realpath "$SCRIPT_DIR/..")
source "$BUILD_ROOT/helpers/paths.sh"
source "$BUILD_ROOT/helpers/lock-helpers.sh"
acquire_release_lock || exit 1
# Only sync understands the publishing flags; sign, promote and update reject
# unknown options outright, so they cannot be forwarded blindly.
COMMON_ARGS=()
SYNC_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
--skip-prod-check | --prune)
SYNC_ARGS+=("$1")
shift
;;
--remote)
SYNC_ARGS+=("$1" "$2")
shift 2
;;
*)
COMMON_ARGS+=("$1")
shift
;;
esac
done
"$SCRIPT_DIR/repo" sign "${COMMON_ARGS[@]}"
"$SCRIPT_DIR/repo" promote "${COMMON_ARGS[@]}"
"$SCRIPT_DIR/repo" update "${COMMON_ARGS[@]}"
"$SCRIPT_DIR/repo" sync "${COMMON_ARGS[@]}" "${SYNC_ARGS[@]}"