Merge "Update to global-jjb v0.12.1"
[releng/builder.git] / jjb / packaging / build-rpm-snap.sh
index b981c707b5ce9d5175b5723b8cdc0b79d4d2c92c..9843af94509d10d2fffcc60f367c54d7b56424e3 100644 (file)
@@ -14,14 +14,14 @@ PYTHON="rpm_build/bin/python"
 $PYTHON -m pip install --upgrade pip
 $PYTHON -m pip install -r "$WORKSPACE/packaging/packages/requirements.txt"
 
-# Extract stream from job name (format: foo-job-name-<stream>)
-# shellcheck disable=SC1083
-STREAM=${{JOB_NAME##*-}}
+# If STREAM not passed, extract from job name (format: foo-job-name-<stream>)
+if [ -z "$STREAM" ]; then
+  # shellcheck disable=SC1083
+  STREAM=${{JOB_NAME##*-}}
+fi
 
 # Convert stream to numeric ODL major version
-if [ "$STREAM" == "boron" ]; then
-  VERSION_MAJOR=5
-elif [ "$STREAM" == "carbon" ]; then
+if [ "$STREAM" == "carbon" ]; then
   VERSION_MAJOR=6
 elif [ "$STREAM" == "nitrogen" ]; then
   VERSION_MAJOR=7