# 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"
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"