Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a19ef36

Browse files
committedJun 14, 2022
fixup! chore: make dependency checks nicer
1 parent ba78076 commit a19ef36

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed
 

‎scripts/publish_release.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ if [[ "$(git describe --always)" != "$new_tag" ]]; then
7070
fi
7171

7272
# This returns the tag before the current tag.
73-
old_tag="$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=1 --max-count=1)")"
73+
old_tag="$(git describe --abbrev=0 HEAD^1)"
74+
75+
# For dry-run builds we want to use the SHA instead of the tag, because the new
76+
# tag probably doesn't exist.
77+
changelog_range="$old_tag..$new_tag"
78+
if [[ "$dry_run" == 1 ]]; then
79+
changelog_range="$old_tag..$(git rev-parse --short HEAD)"
80+
fi
7481

7582
# Craft the release notes.
7683
release_notes="
7784
## Changelog
7885
79-
$(git log --no-merges --pretty=format:"- %h %s" "$old_tag..$new_tag")
86+
$(git log --no-merges --pretty=format:"- %h %s" "$changelog_range")
8087
8188
## Container Image
8289
- \`docker pull $(execrelative ./image_tag.sh --version "$version")\`

0 commit comments

Comments
 (0)
Failed to load comments.