Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Release: the next batch stages while this one promotes (only main's fast-forward waits)
islandmedaf8206e94848
diff --git a/docs/releasing.md b/docs/releasing.mdindex 9c877b54..792fe0a4 100644--- a/docs/releasing.md+++ b/docs/releasing.md@@ -62,6 +62,12 @@ the run. `scripts/release.sh X.Y.Z` then only promotes: step `bump` checks mainwaits for staging's Packages run and checks it, step `tag` tags **exactly that commit** (main must be it). The Releaseworkflow takes that run's packages unchanged, verifies them, smoke-tests them, signs and publishes.+**The next batch stages while this one promotes.** A promote holds a lock (`sf-promoting` in the git common dir,+with its pid) from start to end. `scripts/release.sh X.Y+1 --stage` may run at the same time: staging, its CI, its+packages and T1 go ahead, and only main's fast-forward waits for the lock (`SF_PROMOTE_WAIT_MIN`, default 180).+If the promote pushed release paperwork to main meanwhile (site, feed, What's New: `tools/release/paperwork_only.py`),+the batch lands as a merge on top of it; anything else on main stops as before. A dead holder's lock doesn't count.+What makes a run promotable (tools/release/staged_run.py, used by release.sh steps ci and tag and by release.yml`locate`; refused otherwise, nothing is rebuilt silently):- packages.yml of this repository, triggered by a **push** to `staging` for exactly the tagged commit: never adiff --git a/scripts/merge-queue.sh b/scripts/merge-queue.shindex 01ac64e8..53d7301c 100755--- a/scripts/merge-queue.sh+++ b/scripts/merge-queue.sh@@ -189,7 +189,26 @@ land_staging() { # land_staging [--with CMD] [REF]if [ -n "$pid" ]; then wait "$pid" || local_rc=$?; tail -5 "/tmp/merge-queue-with-${sha:0:8}.log" | sed 's/^/ /'; fiecho " CI on staging: $ci; local: $([ $local_rc = 0 ] && echo ok || echo "failed ($local_rc)"); $(( $(date +%s) - t0 )) s"[ "$ci" = success ] && [ $local_rc = 0 ] || die "staging is red: main stays at $(git rev-parse --short origin/main); fix the batch and run again"+ # A release being promoted on this machine (scripts/release.sh X.Y.Z --yes) holds main until it is done: wait+ # (up to SF_PROMOTE_WAIT_MIN, default 180), then land this batch on top of it.+ local lock waited=0 holder+ lock="$(git rev-parse --git-common-dir)/sf-promoting"+ while holder=$(cat "$lock" 2>/dev/null) && kill -0 "${holder%% *}" 2>/dev/null; do+ [ $waited = 0 ] && echo " main waits for the ${holder#* } promote (pid ${holder%% *}) to finish"+ [ $waited -lt $(( ${SF_PROMOTE_WAIT_MIN:-180} * 60 )) ] ||+ die "the ${holder#* } promote still holds main after ${SF_PROMOTE_WAIT_MIN:-180} min: staging ${sha:0:8} is green, run again when it is done"+ sleep 30; waited=$(( waited + 30 ))+ donegit fetch -q origin main+ # What that promote pushed after the tag (site, feed, What's New) is release paperwork: land the batch on top of it+ # with a merge (tools/release/paperwork_only.py checks the files and lines; anything else stops as before).+ if [ $waited -gt 0 ] && ! git merge-base --is-ancestor origin/main "$sha" &&+ python3 tools/release/paperwork_only.py "$(git merge-base origin/main "$sha")" origin/main >/dev/null; then+ local tree merged+ tree=$(git merge-tree --write-tree "$sha" origin/main) &&+ merged=$(git commit-tree "$tree" -p "$sha" -p origin/main -m "Merge the release paperwork from main into staging ${sha:0:8}") &&+ { echo " main got release paperwork while waiting: landing ${merged:0:8} (${sha:0:8} + main)"; sha=$merged; }+ figit merge-base --is-ancestor origin/main "$sha" ||die "main moved while staging ran ($(git rev-parse --short origin/main)): merge it in and run again"git push -q origin "$sha:refs/heads/main" # a fast-forward: exactly the tree CI passeddiff --git a/scripts/release.sh b/scripts/release.shindex 21e47cd1..327b9d4f 100755--- a/scripts/release.sh+++ b/scripts/release.sh@@ -120,8 +120,17 @@ CURRENT=setupcase ${HIGHLIGHTS:-} in ''|/*) ;; *) HIGHLIGHTS=$PWD/$HIGHLIGHTS ;; esacHIGHLIGHTS_GIVEN=${HIGHLIGHTS:-} # preflight may fill HIGHLIGHTS with a file of its own; resume names only this onework=$(mktemp -d)-trap 'rm -rf "$work"' EXITcd "$(git rev-parse --show-toplevel)"+# Promoting holds main still: the next batch may stage meanwhile (CI, packages, T1), and only its last move, main's+# fast-forward (scripts/merge-queue.sh staging), waits for this lock, so the steps after the tag see this version's+# main (docs/design/release-lanes.md §3). Per machine (the git common dir); a dead holder's lock doesn't count.+PROMOTE_LOCK="$(git rev-parse --git-common-dir)/sf-promoting"+if [ $MODE != stage ] && [ -z "$STAGED" ]; then+ echo "$$ $V" > "$PROMOTE_LOCK"+ trap 'rm -rf "$work"; [ "$(cut -d" " -f1 "$PROMOTE_LOCK" 2>/dev/null)" = $$ ] && rm -f "$PROMOTE_LOCK"' EXIT+else+ trap 'rm -rf "$work"' EXIT+fi# --- helpers that steps share -------------------------------------------------------------------------------------