[ARVADOS] created: 1.1.1-113-ga93098f

Git user git at public.curoverse.com
Mon Dec 4 11:31:54 EST 2017


        at  a93098fbd4ccb72577be9594a7af8fba578bdcb5 (commit)


commit a93098fbd4ccb72577be9594a7af8fba578bdcb5
Author: Fernando Monserrat <fernando.monserrat at gmail.com>
Date:   Mon Dec 4 13:31:34 2017 -0300

    12771: pass newversion for packages or take the usual hash
    Arvados-DCO-1.1-Signed-off-by: Fernando Monserrat <fmonserrat at veritasgenetics.com>

diff --git a/build/run-build-test-packages-one-target.sh b/build/run-build-test-packages-one-target.sh
index 24942e9..f90cae4 100755
--- a/build/run-build-test-packages-one-target.sh
+++ b/build/run-build-test-packages-one-target.sh
@@ -11,6 +11,7 @@ Syntax:
 
 --target <target>
     Distribution to build packages for (default: debian8)
+--verno <version>      
 --upload
     If the build and test steps are successful, upload the packages
     to a remote apt repository (default: false)
@@ -36,7 +37,7 @@ if ! [[ -d "$WORKSPACE" ]]; then
 fi
 
 PARSEDOPTS=$(getopt --name "$0" --longoptions \
-    help,upload,target: \
+    help,target:,verno:,upload \
     -- "" "$@")
 if [ $? -ne 0 ]; then
     exit 1
@@ -56,9 +57,13 @@ while [ $# -gt 0 ]; do
         --target)
             TARGET="$2"; shift
             ;;
+        --verno)
+            VERNO="$2"; shift
+            $VERNO >>$WORKSPACE/version
+            ;;              
         --upload)
             UPLOAD=1
-            ;;
+            ;;          
         --)
             if [ $# -gt 1 ]; then
                 echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
diff --git a/build/run-library.sh b/build/run-library.sh
index 5fc494c..fe9945a 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -40,15 +40,20 @@ format_last_commit_here() {
 version_from_git() {
   # Generates a version number from the git log for the current working
   # directory, and writes it to stdout.
-  local git_ts git_hash prefix
-  if [[ -n "$1" ]] ; then
-      prefix="$1"
-  else
-      prefix="0.1"
-  fi
-
-  declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
-  echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
+  cat $WORKSPACE/version >> $VERNO
+  if [ -n "${VERNO}" ]; then
+      new_version="${VERNO}"
+      echo "${new_version}"
+  else    
+      local git_ts git_hash prefix
+      if [[ -n "$1" ]] ; then
+        prefix="$1"
+      else
+        prefix="0.1"
+      fi
+      declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
+      echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
+  fi    
 }
 
 nohash_version_from_git() {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list