@@ -17,7 +17,6 @@ if [ ! -f pom.xml ] || [ ! -d ${PMD_GITHUB_IO_DIR} ]; then
1717fi
1818
1919RELEASE_VERSION=
20- DEVELOPMENT_VERSION=
2120CURRENT_BRANCH=
2221
2322echo " -------------------------------------------"
3736 NEXT_MINOR=" ${MINOR} "
3837 NEXT_PATCH=$(( "${PATCH} " + 1 ))
3938fi
40- DEVELOPMENT_VERSION=" $MAJOR .$NEXT_MINOR .$NEXT_PATCH "
41- DEVELOPMENT_VERSION=" ${DEVELOPMENT_VERSION} "
4239
43- # allow to override the next version, e.g. via "NEXT_VERSION=7.0.0 ./do-release.sh"
44- if [ " $NEXT_VERSION " != " " ]; then
45- DEVELOPMENT_VERSION=" ${NEXT_VERSION} "
40+ # allow to override the next version, e.g. via "DEVELOPMENT_VERSION=7.0.0-SNAPSHOT ./do-release.sh"
41+ if [ " $DEVELOPMENT_VERSION " = " " ]; then
42+ DEVELOPMENT_VERSION=" $MAJOR .$NEXT_MINOR .$NEXT_PATCH -SNAPSHOT"
43+ fi
44+
45+ # allow to override the build qualifier, e.g. via "BUILDQUALIFIER="$(date -u +v%Y%m%d-%H%M)-rc1" ./do-release.sh"
46+ if [ " $BUILDQUALIFIER " = " " ]; then
47+ # Pick a release BUILDQUALIFIER (e.g. v20170401-0001-r) and update versions
48+ # E.g. version is: "4.0.13" and BUILDQUALIFIER is "v20170401-0001-r".
49+ # The complete version of the plugin will be "4.0.13.v20170401-0001-r
50+ BUILDQUALIFIER=" $( date -u +v%Y%m%d-%H%M) -r"
4651fi
4752
4853# http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
4954CURRENT_BRANCH=$( git symbolic-ref -q HEAD)
5055CURRENT_BRANCH=${CURRENT_BRANCH## refs/ heads/ }
5156CURRENT_BRANCH=${CURRENT_BRANCH:- HEAD}
5257
53- # Pick a release BUILDQUALIFIER (e.g. v20170401-0001-r) and update versions
54- # E.g. version is: "4.0.13" and BUILDQUALIFIER is "v20170401-0001-r".
55- # The complete version of the plugin will be "4.0.13.v20170401-0001-r
56- BUILDQUALIFIER=" $( date -u +v%Y%m%d-%H%M) -r"
58+ export DEVELOPMENT_VERSION
5759export BUILDQUALIFIER
5860
5961echo " RELEASE_VERSION: ${RELEASE_VERSION} .${BUILDQUALIFIER} (this release)"
6062echo " DEVELOPMENT_VERSION: ${DEVELOPMENT_VERSION} (the next version after the release)"
6163echo " CURRENT_BRANCH: ${CURRENT_BRANCH} "
6264
63-
65+ echo
66+ echo " Is this correct?"
67+ echo
68+ echo " Press enter to continue... (or CTRL+C to cancel)"
69+ read -r
6470
6571echo Update the ReleaseNotes with the release date and version:
6672echo
0 commit comments