File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,8 +19,10 @@ 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
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."
25+ else
2426 mvn clean deploy -DskipITs --settings ~ /.m2/settings.xml -P sign-deploy
2527 fi
2628 utilities/update_docs_version.sh
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ RELEASED_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
1010if [ " ${RELEASED_VERSION##* -} " != " SNAPSHOT" ]; then
1111 echo " Changing version to $RELEASED_VERSION in README files"
1212 # Get list of directories for which README.md must be updated
13- module_folders=($( find . -maxdepth 2 \( -regex " ./gcloud-java[-[a-z]+]* " -o -regex " ./gcloud-java-contrib/gcloud-java[-[a-z]+]* " \) -type d) . ./gcloud-java)
13+ module_folders=($( find . -maxdepth 2 \( -regex " ./gcloud-java[-[a-z]+]+ " -o -regex " ./gcloud-java-contrib/gcloud-java[-[a-z]+]+ " \) -type d) . ./gcloud-java)
1414 for item in ${module_folders[*]}
1515 do
1616 sed -ri " s/<version>[0-9]+\.[0-9]+\.[0-9]+<\/version>/<version>${RELEASED_VERSION} <\/version>/g" ${item} /README.md
Original file line number Diff line number Diff line change 1111# Get the previous maven project version.
1212CURRENT_VERSION=$( mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev ' (^\[|\w+:)' )
1313# Get list of directories for which pom.xml must be updated
14- module_folders=($( find . -maxdepth 2 \( -regex " ./gcloud-java[-[a-z]+]* " -o -regex " ./gcloud-java-contrib/gcloud-java[-[a-z]+]* " \) -type d) . ./gcloud-java)
14+ module_folders=($( find . -maxdepth 2 \( -regex " ./gcloud-java[-[a-z]+]+ " -o -regex " ./gcloud-java-contrib/gcloud-java[-[a-z]+]+ " \) -type d) . ./gcloud-java)
1515if [ $# -eq 1 ]; then
1616 NEW_VERSION=$1
1717elif [ " ${CURRENT_VERSION##* -} " != " SNAPSHOT" ]; then
You can’t perform that action at this time.
0 commit comments