Skip to content
Bitcoin Roots

v29.4-roots.1 · Commit 8: [PATCH 08/13] ci: restore assurance and isolate Core fixtures

ci/release/create-patch-series.sh

Before: ci/release/create-patch-series.sh · After: ci/release/create-patch-series.sh

File metadata
index cbae9c2f3b9e380daf958de44ce5d082a2eb2172..df8d91c9b5f504e7c43bf685c46a232671fd1579 100755

Download original patch · Release notes

Diff rows 1–29 of 29. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

ci/release/create-patch-series.sh CHANGED
@@ -38,8 +38,10 @@ cleanup() {
38
38
  }
39
39
  trap cleanup EXIT
40
40
 
41
+ # GitHub workflow and repository-management files belong to the canonical
42
+ # branch and tag, but they are not part of the portable Roots product patch.
41
43
  git format-patch --stdout --binary --full-index --base="$core_commit" \
42
- "${core_commit}..${tag_commit}" > "$patch_tmp"
44
+ "${core_commit}..${tag_commit}" -- . ':(exclude).github/**' > "$patch_tmp"
43
45
  if [[ ! -s "$patch_tmp" ]]; then
44
46
  printf 'Generated patch series is empty for %s\n' "$release_tag" >&2
45
47
  exit 1
@@ -52,10 +54,14 @@ git -C "$replay_dir/repository" \
52
54
  -c user.email='release-verification@invalid' \
53
55
  am -3 "$patch_tmp" >/dev/null
54
56
 
55
- expected_tree="$(git rev-parse --verify "${tag_commit}^{tree}")"
56
- replayed_tree="$(git -C "$replay_dir/repository" rev-parse --verify 'HEAD^{tree}')"
57
- if [[ "$replayed_tree" != "$expected_tree" ]]; then
58
- printf 'Patch replay tree does not match release tag %s\n' "$release_tag" >&2
57
+ if ! git -C "$replay_dir/repository" diff --quiet \
58
+ "$tag_commit" HEAD -- . ':(exclude).github/**'; then
59
+ printf 'Patch replay differs from release tag %s outside .github\n' "$release_tag" >&2
60
+ exit 1
61
+ fi
62
+ if ! git -C "$replay_dir/repository" diff --quiet \
63
+ "$core_commit" HEAD -- .github; then
64
+ printf 'Patch replay unexpectedly changes .github for %s\n' "$release_tag" >&2
59
65
  exit 1
60
66
  fi
61
67