diff options
author | Ismael Luceno | 2014-07-02 08:42:28 -0300 |
---|---|---|
committer | Ismael Luceno | 2014-07-02 14:08:58 -0300 |
commit | 1cb0116b167025e3758bcdac6a9b70166e7dfb50 (patch) | |
tree | 7df1a61a3221ec89fd6008c66c5afc151be4da4a /FUNCTIONS | |
parent | 95c6323e73a818fce3a4a025bf0b28868a7780d0 (diff) |
FUNCTIONS: Add get_scm_version function
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-x | FUNCTIONS | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -662,6 +662,18 @@ function get_up_spell_name() { echo ${1:-$SPELL} | tr "a-z-" "A-Z_" } +#--- +## Get branch-based/autoupdate-aware version number +#--- +function get_scm_version() { + local spell=$(get_up_spell_name) && + local spell_branch="$spell"_BRANCH && + local spell_autoupdate="$spell"_AUTOUPDATE && + echo "${!spell_branch:-scm}$( + [[ "${!spell_autoupdate}" = y ]] && date "+-%Y%m%d")" +} + + # Move SPELL_OPTS to OPTS # basicly generic OPTS="$SPELL_OPTS $OPTS" function prepare_opts() { |