From 3456b330505dd74a581c997433fa808dbf51c229 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Thu, 18 Sep 2025 09:16:10 +0200 Subject: [PATCH] build_tools/release.sh: push to the integration branch when all goes well Also, ignore any "sendemail.to" Git config, and remove a temporary statement in release notes. --- .github/workflows/release.yml | 2 -- build_tools/release.sh | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d3b1f34f..ad520fbfb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,8 +73,6 @@ jobs: *Download links: To download the source code for fish, we suggest the file named "fish-$version.tar.xz". The file downloaded from "Source code (tar.gz)" will not build correctly.* - *There is no GPG signature because we haven't yet decided how to integrate signing into the new release automation.* - *The files called fish-$version-linux-\*.tar.xz are experimental packages containing a single standalone ``fish`` binary for any Linux with the given architecture.* EOF } >/tmp/fish-built/release-notes.md diff --git a/build_tools/release.sh b/build_tools/release.sh index 6c11e98d1..06beeb351 100755 --- a/build_tools/release.sh +++ b/build_tools/release.sh @@ -46,6 +46,13 @@ if git tag | grep -qxF "$version"; then exit 1 fi +integration_branch=$( + git for-each-ref --points-at=HEAD 'refs/heads/Integration_*' \ + --format='%(refname:strip=2)' +) +[ -n "$integration_branch" ] || + git merge-base --is-ancestor $remote/master HEAD + sed -n 1p CHANGELOG.rst | grep -q '^fish .*(released ???)$' sed -n 2p CHANGELOG.rst | grep -q '^===*$' @@ -157,8 +164,9 @@ done git push git@github.com:$repository_owner/fish-site HEAD:master ) -if git merge-base --is-ancestor $remote/master $version -then +if [ -n "$integration_branch" ]; then + git push $remote "$version^{commit}":refs/heads/$integration_branch +else changelog=$(cat - CHANGELOG.rst <CHANGELOG.rst CommitVersion ${version}-snapshot "start new cycle" git push $remote HEAD:master -else - # Probably on an integration branch. - # TODO Maybe push when that's safe (or move this to CI). - : fi # TODO This can currently require a TTY for editing and password @@ -180,12 +184,12 @@ if [ "$repository_owner" = fish-shell ]; then { mail=$(mktemp) cat >$mail < Subject: fish $version released See https://github.com/fish-shell/fish-shell/releases/tag/$version EOF - git send-email --suppress-cc=all $mail + git send-email --suppress-cc=all --confirm=always $mail \ + --to="fish-users Mailing List " rm $mail } fi