gen-repo.sh fix, allow install from master binary 13/2313/1
authorMike Marchetti <mmarchetti@sandvine.com>
Fri, 29 Sep 2017 18:30:28 +0000 (14:30 -0400)
committerMike Marchetti <mmarchetti@sandvine.com>
Fri, 29 Sep 2017 18:30:28 +0000 (14:30 -0400)
Change-Id: I34dae078e1890f1031f6af1db9497e65ef6a6b1f
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
installers/install_osm.sh
tools/gen-repo.sh

index f39eb41..1e13852 100755 (executable)
@@ -318,8 +318,8 @@ fi
 # if develop, we force master
 [ -z "$COMMIT_ID" ] && [ -n "$DEVELOP" ] && COMMIT_ID="master"
 
-# if master, force install from source
-[ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
+# forcing source from master removed. Now only install from source when explicit
+[ -n "$COMMIT_ID" ] && [ "$COMMIT_ID" == "master" ] && INSTALL_FROM_SOURCE="y"
 
 if [ -n "$TEST_INSTALLER" ]; then
     echo -e "\nUsing local devops repo for OSM installation"
index 4ddb017..6fb2ad8 100755 (executable)
@@ -33,6 +33,8 @@ function dump_vars() {
     echo "RSYNC_USER_HOST $RSYNC_USER_HOST"
     echo "RSYNC_OPTIONS   $RSYNC_OPTIONS"
     echo "PUBLIC_KEY_FILE $PUBLIC_KEY_FILE"
+    echo "BUILD:          $BUILD"
+    echo "BUILD_NUMBER:   $BUILD_NUMBER"
 }
 
 IN_REPO="unstable"
@@ -87,17 +89,18 @@ while getopts ":p:i:o:k:j::d:b:r:h:R:P:" o; do
     esac
 done
 
-dump_vars
-
 BASE_DIR=$REPO_BASE/osm/debian/$RELEASE_DIR
 
 [ -z "$BUILD" ] && FATAL "missing option: -b <build>"
 
+BUILD_NUMBER=$(echo "$BUILD" | sed -e 's/.*:: //g')
+
+dump_vars
+
 [ -x $JFROG_CLI ] || FATAL "jfrog cli not found. Please install https://www.jfrog.com/getcli/ and use option '-j <jfrog cli location>'"
 
 $JFROG_CLI rt download --build "$BUILD" osm-release || FATAL "Failed to download"
 
-BUILD_NUMBER=$(basename "$BUILD")
 
 [ $PASSPHRASE_FILE ] && GPG_PASSPHRASE="--no-tty --no-use-agent --passphrase \"$(cat $PASSPHRASE_FILE)\""