utils.sh :: support Numix and Numix Frost when generating CHANGES file
(cherry picked from commit 07bd693)pull/611/head
parent
5b07932a0d
commit
ee50385aff
|
@ -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##*.}"
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue