Skip to content

Commit

Permalink
Fixes do/release being broken with newer versions of git
Browse files Browse the repository at this point in the history
Because `head` exits from `git tag` after the first line is passed
when `git` tries to push additional lines into the pipe it will receive
a `SIGPIPE` for a broken pipe and exit with a nonzero exit code, which
causes the entire script to fail due to `-e` and `-o pipefail`.

The simple solution is to reverse the sort order and use `tail` instead.
  • Loading branch information
Daverball committed Dec 19, 2024
1 parent dc2ebc8 commit 947c489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion do/release
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function configure-sentry() {
}

function current-version() {
git tag --sort=-version:refname --merged master | head -n 1
git tag --sort=version:refname --merged master | tail -n 1
}

function announce-release-on-sentry-io() {
Expand Down

0 comments on commit 947c489

Please sign in to comment.