mirror of
https://github.com/tmux/tmux.git
synced 2026-10-06 17:49:52 +00:00
actions: use published openbsd-git as base update
This commit is contained in:
@@ -99,13 +99,12 @@ jobs:
|
|||||||
cd "$CUTOVER_DIR"
|
cd "$CUTOVER_DIR"
|
||||||
git switch master
|
git switch master
|
||||||
|
|
||||||
base_ref=refs/openbsd/import-base
|
if ! git rev-parse --verify -q origin/openbsd-git >/dev/null; then
|
||||||
if ! git rev-parse --verify -q "$base_ref" >/dev/null; then
|
echo "origin/openbsd-git is missing; publish the openbsd-git branch before running updates." >&2
|
||||||
echo "$base_ref is missing; initialise it before running updates." >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
old_base=$(git rev-parse "$base_ref")
|
old_base=$(git rev-parse origin/openbsd-git)
|
||||||
new_base=$(git rev-parse openbsd-git)
|
new_base=$(git rev-parse openbsd-git)
|
||||||
|
|
||||||
if [ "$old_base" = "$new_base" ]; then
|
if [ "$old_base" = "$new_base" ]; then
|
||||||
@@ -115,12 +114,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! git merge-base --is-ancestor "$old_base" "$new_base"; then
|
if ! git merge-base --is-ancestor "$old_base" "$new_base"; then
|
||||||
echo "openbsd-git is not a descendant of $base_ref; aborting." >&2
|
echo "new openbsd-git is not a descendant of origin/openbsd-git; aborting." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git cherry-pick "$old_base..$new_base"
|
git cherry-pick "$old_base..$new_base"
|
||||||
git update-ref "$base_ref" "$new_base"
|
|
||||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Push cutover repository
|
- name: Push cutover repository
|
||||||
|
|||||||
Reference in New Issue
Block a user