Skip to content

Commit 54865ee

Browse files
chingor13sduskis
authored andcommitted
Provide STAGING_REPOSITORY_ID as an environment variable (#226)
1 parent d6847af commit 54865ee

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

google-auth-library-java/.kokoro/release/drop.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@
1515

1616
set -eo pipefail
1717

18+
# STAGING_REPOSITORY_ID must be set
19+
if [ -z "${STAGING_REPOSITORY_ID}" ]; then
20+
echo "Missing STAGING_REPOSITORY_ID environment variable"
21+
exit 1
22+
fi
23+
1824
source $(dirname "$0")/common.sh
19-
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../)/settings.xml
20-
pushd $(dirname "$0")/../
25+
pushd $(dirname "$0")/../../
2126

2227
setup_environment_secrets
2328
create_settings_xml_file "settings.xml"
2429

25-
mvn nexus-staging:drop -DperformRelease=true
30+
mvn nexus-staging:drop -B \
31+
--settings=settings.xml \
32+
-DstagingRepositoryId=${STAGING_REPOSITORY_ID}

google-auth-library-java/.kokoro/release/promote.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,20 @@
1515

1616
set -eo pipefail
1717

18+
# STAGING_REPOSITORY_ID must be set
19+
if [ -z "${STAGING_REPOSITORY_ID}" ]; then
20+
echo "Missing STAGING_REPOSITORY_ID environment variable"
21+
exit 1
22+
fi
23+
1824
source $(dirname "$0")/common.sh
19-
MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../)/settings.xml
20-
pushd $(dirname "$0")/../
25+
26+
pushd $(dirname "$0")/../../
2127

2228
setup_environment_secrets
2329
create_settings_xml_file "settings.xml"
2430

25-
mvn nexus-staging:release -DperformRelease=true
31+
mvn nexus-staging:release -B \
32+
-DperformRelease=true \
33+
--settings=settings.xml \
34+
-DstagingRepositoryId=${STAGING_REPOSITORY_ID}

0 commit comments

Comments
 (0)