utils.sh :: support Numix and Numix Frost when generating CHANGES file

(cherry picked from commit 07bd693)
This commit is contained in:
Dustin Falgout
2016-10-23 02:36:14 -05:00
parent 5b07932a0d
commit ee50385aff
+23 -6
View File
@@ -48,15 +48,32 @@ output_changes_file_version_marker() {
update_changes_file() {
local LAST_STABLE_RELEASE NEXT_STABLE_RELEASE
LAST_STABLE_RELEASE=$(git describe --tags $(git rev-list --tags --max-count=1))
LAST_STABLE_RELEASE=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))
LAST_MAJOR_MINOR="${LAST_STABLE_RELEASE%.*}"
LAST_MAJOR="${LAST_STABLE_RELEASE%%.*}"
LAST_MINOR="${LAST_MAJOR_MINOR#*.}"
LAST_PATCH="${LAST_STABLE_RELEASE##*.}"
NEXT_PATCH=$(($LAST_PATCH + 1))
NEXT_STABLE_RELEASE="${LAST_MAJOR_MINOR}.${NEXT_PATCH}"
case "${PWD##*/}" in
Numix)
NEXT_PATCH=$(($LAST_PATCH + 1))
NEXT_STABLE_RELEASE="${LAST_MAJOR_MINOR}.${NEXT_PATCH}"
;;
Numix-Frost)
LAST_MAJOR=$(($LAST_MAJOR + 1))
NEXT_STABLE_RELEASE="${LAST_MAJOR}.${LAST_MINOR}.${LAST_PATCH}"
LAST_PATCH=$(($LAST_PATCH - 1))
LAST_STABLE_RELEASE="${LAST_MAJOR}.${LAST_MINOR}.${LAST_PATCH}"
;;
*)
echo 'Unknown directory!' && exit 1
;;
esac
[[ -f CHANGES ]] && mv CHANGES CHANGES.old