Skip to content

Commit 72ab740

Browse files
authored
More release script fixes (vfs-2.55.0 edition) (#961)
This PR preemptively ports #959 to the `v2.55` train.
2 parents 57bf9be + d283b1a commit 72ab740

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/release-homebrew.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ die () {
3232
exit 1
3333
}
3434

35-
case "$1" in
35+
case "${1-}" in
3636
--force) force=t; shift;;
3737
*) force=;;
3838
esac
@@ -100,7 +100,9 @@ sha256:*) sha256=${digest#sha256:} ;;
100100
esac
101101

102102
# Enforce 64 lowercase hex chars without spawning grep.
103-
*[!0-9a-f]*|"")
103+
case "$sha256" in
104+
*[!0-9a-f]*|"")
105+
die "asset digest is not lowercase hex: $sha256" ;;
104106
esac
105107
test ${#sha256} -eq 64 ||
106108
die "asset digest is not 64 chars long: $sha256"
@@ -151,6 +153,7 @@ echo "==> Pushed: $(git log -1 --format='%h %s')"
151153
pr_url=$(gh pr create \
152154
--repo "$REPO" \
153155
--head "$BRANCH" \
154-
--title "$TITLE")
156+
--title "$TITLE" \
157+
--body "See https://github.com/microsoft/git/releases/tag/$TAG_NAME")
155158

156159
echo "==> Created: $pr_url"

.github/release-vfsforgit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ die () {
2626
exit 1
2727
}
2828

29-
case "$1" in
29+
case "${1-}" in
3030
--force) force=t; shift;;
3131
*) force=;;
3232
esac

.github/release-winget.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Linux)
4949
;;
5050
esac
5151

52-
case "$1" in
52+
case "${1-}" in
5353
--force) force=t; shift;;
5454
*) force=;;
5555
esac
@@ -70,8 +70,10 @@ version=$(printf '%s' "${TAG_NAME#v}" | sed 's/vfs\.//')
7070
echo "==> Version: $version"
7171

7272
workdir=$(mktemp -d)
73+
origdir="$(pwd)"
7374
success=0
7475
cleanup () {
76+
cd "$origdir"
7577
if [ "$success" = 1 ]; then
7678
rm -rf "$workdir"
7779
else

0 commit comments

Comments
 (0)