File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,19 @@ cd mfix
2121# gather version list
2222readarray -t all_versions < <( git ls-remote --heads origin | awk ' {print $2}' | sed ' s:.*/::' | sort -V)
2323
24+ last_released_version=" "
2425do_release () {
2526 echo " will now make release for $1 "
2627 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+ current_tag=$( git describe --tags --abbrev=0)
29+ echo " we think the current tag is $current_tag "
2830 echo " the current commit head is $( git rev-parse HEAD) "
29- read -p " new tag name: " tag_name
31+ old_version_specifier=$( echo $current_tag | awk -F+ ' {print $2}' )
32+ read -e -p " new tag name (${old_version_specifier} ): " -i " ${last_released_version} " tag_name
33+ if [[ $tag_name != * " +" * ]]; then
34+ tag_name=${tag_name} +${old_version_specifier}
35+ fi
36+ last_released_version=$( echo $tag_name | awk -F+ ' {print $1}' )
3037 git tag -a $tag_name -m " $tag_name "
3138 git push --tags
3239 gh release create $tag_name --target $1 --title " $tag_name " --notes " "
You can’t perform that action at this time.
0 commit comments