diff options
author | 2014-07-18 17:33:53 +0200 | |
---|---|---|
committer | 2014-07-18 17:33:53 +0200 | |
commit | 6bb55c0f9bb8925a50cb4e2f9aec302da6037500 (patch) | |
tree | 5eedae5df2a9769c6bcbd3f7345ae1045b6ae4fe /bin | |
parent | bin/invoke_pyscript.bash: fix (diff) | |
download | R_overlay-6bb55c0f9bb8925a50cb4e2f9aec302da6037500.tar.gz R_overlay-6bb55c0f9bb8925a50cb4e2f9aec302da6037500.tar.bz2 R_overlay-6bb55c0f9bb8925a50cb4e2f9aec302da6037500.zip |
bin/build/setver.sh: change suffix handling
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build/setver.sh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/build/setver.sh b/bin/build/setver.sh index ae8b048..bf5bf67 100755 --- a/bin/build/setver.sh +++ b/bin/build/setver.sh @@ -170,10 +170,11 @@ while [ ${#} -gt 0 ]; do --force-commit) want_forcecommit=true ;; --git-tag) want_gittag=true ;; - [Mmp]bump) ACTION="${1}" ;; - '+') ACTION=pbump ;; - '++') ACTION=mbump ;; - *.*.*) ACTION=setver; V="${1}" ;; + [Mmp]bump) ACTION="${1}" ;; + '+') ACTION=pbump ;; + '++') ACTION=mbump ;; + *.*.*) ACTION=setver; V="${1}" ;; + *.*.*[-_]*) ACTION=setver; V="${1}"; new_suffix= ;; setver) [ -n "${2-}" ] || die "one non-empty arg required after '${1}'." @@ -218,18 +219,18 @@ autodie parse_version "${OLDVER}" case "${ACTION-}" in pbump) inc "${plvl}" - V="${major}.${minor}.${v0}${new_suffix}" + V="${major}.${minor}.${v0}" ;; mbump) inc "${minor}" - V="${major}.${v0}.0${new_suffix}" + V="${major}.${v0}.0" ;; Mbump) inc "${major}" - V="${v0}.0.0${new_suffix}" + V="${v0}.0.0" ;; setver) - true + V="${V}${new_suffix}" ;; *) ${want_reset} || die "unknown or no action specified." |