File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments