File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# Promote a microsoft/git release into the microsoft/homebrew-git tap.
44#
55# Usage:
6- # .github/release-homebrew.sh [<TAG_NAME>]
6+ # .github/release-homebrew.sh [--force] [ <TAG_NAME>]
77#
88# If TAG_NAME is omitted, the latest microsoft/git release is used.
99#
10+ # Dowgrades require `--force`.
11+ #
1012# Prerequisites:
1113# - `gh` authenticated (via `gh auth login`) as a user with push
1214# access to microsoft/homebrew-git.
@@ -30,6 +32,11 @@ die () {
3032 exit 1
3133}
3234
35+ case " $1 " in
36+ --force) force=t; shift ;;
37+ * ) force=;;
38+ esac
39+
3340TAG_NAME=${1-}
3441if [ -z " $TAG_NAME " ]; then
3542 echo " ==> No tag given; resolving latest microsoft/git release"
6168lowest=$( printf ' %s\n%s\n' " $version " " $current_version " |
6269 sort -V | sed 1q)
6370if [ " $lowest " = " $version " ]; then
71+ test -n " $force " ||
6472 die " regression: cask is at $current_version ," \
6573 " refusing to downgrade to $version "
74+ echo " warning: **downgrading** from $current_version to $version " >&2
6675fi
6776
6877echo " ==> Fetching release metadata"
Original file line number Diff line number Diff line change 33# Promote a microsoft/git release into the microsoft/VFSForGit repo.
44#
55# Usage:
6- # .github/release-vfsforgit.sh [<TAG_NAME>]
6+ # .github/release-vfsforgit.sh [--force] [ <TAG_NAME>]
77#
88# If TAG_NAME is omitted, the latest microsoft/git release is used.
99#
10+ # Dowgrades require `--force`.
11+ #
1012# Prerequisites:
1113# - `gh` authenticated (via `gh auth login`) as a user with push
1214# access to microsoft/VFSForGit.
@@ -24,6 +26,11 @@ die () {
2426 exit 1
2527}
2628
29+ case " $1 " in
30+ --force) force=t; shift ;;
31+ * ) force=;;
32+ esac
33+
2734TAG_NAME=${1-}
2835if [ -z " $TAG_NAME " ]; then
2936 echo " ==> No tag given; resolving latest microsoft/git release"
5663lowest=$( printf ' %s\n%s\n' " $TAG_NAME " " $current_tag " |
5764 sort -V | sed 1q)
5865if [ " $lowest " = " $TAG_NAME " ]; then
66+ test -n " $force " ||
5967 die " regression: GIT_VERSION is $current_tag ," \
6068 " refusing to downgrade to $TAG_NAME "
69+ echo " warning: **downgrading** from $current_version to $TAG_NAME " >&2
6170fi
6271
6372workdir=$( mktemp -d)
Original file line number Diff line number Diff line change 33# Promote a microsoft/git release into the microsoft/winget-pkgs repo.
44#
55# Usage:
6- # .github/release-winget.sh [<TAG_NAME>]
6+ # .github/release-winget.sh [--force] [ <TAG_NAME>]
77#
88# If TAG_NAME is omitted, the latest microsoft/git release is used.
99#
10+ # Dowgrades require `--force`.
11+ #
1012# Prerequisites:
1113# - Runs on Windows (the winget authoring tool wingetcreate.exe is
1214# Windows-only). Use Git for Windows' bash, an MSYS2 shell, WSL
@@ -47,6 +49,11 @@ Linux)
4749 ;;
4850esac
4951
52+ case " $1 " in
53+ --force) force=t; shift ;;
54+ * ) force=;;
55+ esac
56+
5057TAG_NAME=${1-}
5158if [ -z " $TAG_NAME " ]; then
5259 echo " ==> No tag given; resolving latest microsoft/git release"
98105lowest=$( printf ' %s\n%s\n' " $version " " $current_version " |
99106 sort -V | sed 1q)
100107if [ " $lowest " = " $version " ]; then
108+ test -n " $force " ||
101109 die " regression: package is at $current_version ," \
102110 " refusing to downgrade to $version "
111+ echo " warning: **downgrading** from $current_version to $version " >&2
103112fi
104113
105114echo " ==> Fetching release metadata"
You can’t perform that action at this time.
0 commit comments