Simplify autorelease to not use release tags
[releng/builder.git] / jjb / autorelease / include-raw-autorelease-release-versions.sh
index 0b38f0ee081549f07041083a0cdd8644b1b80c1d..bb50bec4170fb9fc897d975209ea113c60d01617 100644 (file)
 # RELEASE_TAG=Beryllium-SR1  # Example
 # RELEASE_BRANCH=stable/beryllium  # Example
 
-LFTOOLS_DIR="$WORKSPACE/.venv-lftools"
-if [ ! -d "$LFTOOLS_DIR" ]
-then
-    virtualenv "$LFTOOLS_DIR"
-    # shellcheck disable=SC1090
-    source "$LFTOOLS_DIR/bin/activate"
-    pip install --upgrade pip
-    pip freeze
-    pip install lftools
-fi
-# shellcheck disable=SC1090
-source "$LFTOOLS_DIR/bin/activate"
+# Set release tag as $STREAM, when no release tag is passed
+RELEASE_TAG="${RELEASE_TAG:-${STREAM^}}"
+# Ensure that the first letter of RELEASE_TAG is uppercase.
+RELEASE_TAG="${RELEASE_TAG^}"
 
 # Directory to put git format-patches
 PATCH_DIR="$WORKSPACE/patches"
@@ -34,7 +26,8 @@ git submodule foreach "git commit -am \"Release $RELEASE_TAG\" || true"
 git commit -am "Release $RELEASE_TAG"
 
 mkdir patches
-mv taglist.log "$PATCH_DIR"
+# TODO: Fix this workaround so that scripts will ensure that taglist.log exists and archived.
+mv taglist.log "$PATCH_DIR" || true
 modules=$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' pom.xml)
 for module in $modules; do
     pushd "$module"