Skip to content

Commit 31ba30d

Browse files
committed
Merge 1.16 into 1.18
2 parents 140e19d + b0ab187 commit 31ba30d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

scripts/autorelease.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
set -e
3+
4+
WORK_DIR=`mktemp -d`
5+
6+
# deletes the temp directory
7+
function cleanup {
8+
cd $HOME
9+
rm -rf "$WORK_DIR"
10+
}
11+
12+
trap cleanup EXIT
13+
14+
# clone ModernFix repo
15+
16+
echo "downloading temporary modernfix..."
17+
cd $WORK_DIR
18+
git clone https://github.com/embeddedt/ModernFix mfix &>/dev/null
19+
cd mfix
20+
21+
# gather version list
22+
readarray -t all_versions < <(git ls-remote --heads origin | awk '{print $2}' | sed 's:.*/::' | sort -V)
23+
24+
do_release() {
25+
echo "will now make release for $1"
26+
git checkout $1 &>/dev/null || git checkout -b $1 &>/dev/null
27+
echo "we think the current tag is $(git describe --tags --abbrev=0)"
28+
echo "the current commit head is $(git rev-parse HEAD)"
29+
read -p "new tag name: " tag_name
30+
gh release create $tag_name --target $1 --title "$tag_name" --notes ""
31+
}
32+
33+
for version in "${all_versions[@]}"; do
34+
read -r -p "Make release on ${version} branch? [y/N] " response
35+
case "$response" in
36+
[yY][eE][sS]|[yY])
37+
do_release $version
38+
;;
39+
*)
40+
;;
41+
esac
42+
done

0 commit comments

Comments
 (0)