Skip to content

Commit 9a1ffbd

Browse files
author
Ajay Kannan
committed
Use curl instead of maven wagon
1 parent ddb7c99 commit 9a1ffbd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

utilities/after_success.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
1919
fi
2020
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
2121
# Deploy Maven artifacts (if they don't exist yet) and update artifact version in READMEs.
22-
ARTIFACT_EXISTS=$(mvn wagon:exist -Dwagon.url=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION)
23-
if [[ "$ARTIFACT_EXISTS" == *"does not exists."* -a "$ARTIFACT_EXISTS" != "" ]]; then
24-
mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy
22+
URL=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION
23+
if curl --output /dev/null --silent --head --fail "$URL"; then
24+
echo "Not deploying artifacts because it seems like they already exist."
2525
else
26-
echo "Not deploying artifacts because it seems like they already exist."
26+
mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy
2727
fi
2828
utilities/update_docs_version.sh
2929

0 commit comments

Comments
 (0)