# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
-
+echo "---> maven-stage.sh"
# This script publishes artifacts to a staging repo in Nexus.
#
# $WORKSPACE/m2repo : Exists and used to deploy the staging repository.
# Ensure we fail the job if any steps fail.
set -xeu -o pipefail
+# shellcheck disable=SC1090
+. ~/lf-env.sh
+
+lf-activate-venv --python python3 lftools
+
TMP_FILE="$(mktemp)"
lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE"
staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$TMP_FILE")