Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] RFC: Function to build the version name for SCM branches

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Ismael Luceno <ismael.luceno AT gmail.com>
  • To: sm-discuss <sm-discuss AT lists.ibiblio.org>
  • Subject: [SM-Discuss] RFC: Function to build the version name for SCM branches
  • Date: Wed, 2 Jul 2014 08:36:04 -0300

--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -662,6 +662,17 @@ function get_up_spell_name() {
echo ${1:-$SPELL} | tr "a-z-" "A-Z_"
}

+#---
+## Get branch-based/autoupdate-aware version name
+#---
+function get_scm_version() {
+ local spell=$(get_up_spell_name) &&
+ local vers="$spell"_BRANCH &&
+ local au="$spell"_AUTOUPDATE &&
+ echo "${!vers:-scm}$([[ "${!au}" = y ]] && date "+-%Y%m%d")"
+}
+
+
# Move SPELL_OPTS to OPTS
# basicly generic OPTS="$SPELL_OPTS $OPTS"
function prepare_opts() {

Attachment: signature.asc
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page