Skip to content

Commit 4701056

Browse files
authored
Autorelease will also auto publish (#271)
* Autorelease will also auto publish * Remove debug echo
1 parent 0d2b93f commit 4701056

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

.kokoro/build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
2525
mvn test -B
2626

2727
bash $KOKORO_GFILE_DIR/codecov.sh
28-
#bash .kokoro/codecov.sh

.kokoro/release/stage.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ pushd $(dirname "$0")/../../
2626
setup_environment_secrets
2727
create_settings_xml_file "settings.xml"
2828

29-
mvn clean install deploy \
29+
AUTORELEASE="false"
30+
if [[ -n "${AUTORELEASE_PR}" ]]
31+
then
32+
AUTORELEASE="true"
33+
fi
34+
35+
mvn clean install deploy -B \
3036
--settings ${MAVEN_SETTINGS_FILE} \
3137
-DperformRelease=true \
3238
-Dgpg.executable=gpg \
3339
-Dgpg.passphrase=${GPG_PASSPHRASE} \
34-
-Dgpg.homedir=${GPG_HOMEDIR}
40+
-Dgpg.homedir=${GPG_HOMEDIR} \
41+
-Ddeploy.autorelease=${AUTORELEASE}

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<project.junit.version>4.12</project.junit.version>
5858
<project.guava.version>27.1-android</project.guava.version>
5959
<project.appengine.version>1.9.74</project.appengine.version>
60+
<deploy.autorelease>false</deploy.autorelease>
6061
</properties>
6162

6263
<dependencyManagement>
@@ -129,7 +130,7 @@
129130
<configuration>
130131
<serverId>ossrh</serverId>
131132
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
132-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
133+
<autoReleaseAfterClose>${deploy.autorelease}</autoReleaseAfterClose>
133134
</configuration>
134135
</plugin>
135136
<plugin>

0 commit comments

Comments
 (0)