Skip to content

Commit

Permalink
Use curl instead of maven wagon
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajay Kannan committed Apr 8, 2016
1 parent 72aafe4 commit c1b4032
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions utilities/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
fi
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
# Deploy Maven artifacts (if they don't exist yet) and update artifact version in READMEs.
ARTIFACT_EXISTS=$(mvn wagon:exist -Dwagon.url=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION)
if [[ "$ARTIFACT_EXISTS" == *"does not exists."* -a "$ARTIFACT_EXISTS" != "" ]]; then
URL=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION
if curl --output /dev/null --silent --head --fail "$URL"; then
echo "Not deploying artifacts because it seems like they already exist."
else
mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy
fi
utilities/update_docs_version.sh
Expand Down
2 changes: 1 addition & 1 deletion utilities/update_docs_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RELEASED_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
if [ "${RELEASED_VERSION##*-}" != "SNAPSHOT" ]; then
echo "Changing version to $RELEASED_VERSION in README files"
# Get list of directories for which README.md must be updated
module_folders=($(find . -maxdepth 2 \( -regex "./gcloud-java[-[a-z]+]*" -o -regex "./gcloud-java-contrib/gcloud-java[-[a-z]+]*" \) -type d) . ./gcloud-java)
module_folders=($(find . -maxdepth 2 \( -regex "./gcloud-java[-[a-z]+]+" -o -regex "./gcloud-java-contrib/gcloud-java[-[a-z]+]+" \) -type d) . ./gcloud-java)
for item in ${module_folders[*]}
do
sed -ri "s/<version>[0-9]+\.[0-9]+\.[0-9]+<\/version>/<version>${RELEASED_VERSION}<\/version>/g" ${item}/README.md
Expand Down
2 changes: 1 addition & 1 deletion utilities/update_pom_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Get the previous maven project version.
CURRENT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
# Get list of directories for which pom.xml must be updated
module_folders=($(find . -maxdepth 2 \( -regex "./gcloud-java[-[a-z]+]*" -o -regex "./gcloud-java-contrib/gcloud-java[-[a-z]+]*" \) -type d) . ./gcloud-java)
module_folders=($(find . -maxdepth 2 \( -regex "./gcloud-java[-[a-z]+]+" -o -regex "./gcloud-java-contrib/gcloud-java[-[a-z]+]+" \) -type d) . ./gcloud-java)
if [ $# -eq 1 ]; then
NEW_VERSION=$1
elif [ "${CURRENT_VERSION##*-}" != "SNAPSHOT" ]; then
Expand Down

0 comments on commit c1b4032

Please sign in to comment.