@@ -7,37 +7,35 @@ source ./utilities/integration_test_env.sh
77echo " Travis branch: " ${TRAVIS_BRANCH}
88echo " Travis pull request: " ${TRAVIS_PULL_REQUEST}
99echo " Travis JDK version: " ${TRAVIS_JDK_VERSION}
10+ if [ " ${TRAVIS_JDK_VERSION} " == " oraclejdk7" -a " ${TRAVIS_BRANCH} " == " master" -a " ${TRAVIS_PULL_REQUEST} " == " false" ]; then
11+ mvn cobertura:cobertura coveralls:report
1012
11- if [ " ${TRAVIS_JDK_VERSION} " == " oraclejdk7" -a " ${TRAVIS_BRANCH} " == " master" ]; then
12- mvn clean cobertura:cobertura coveralls:report
13- if [ " ${TRAVIS_PULL_REQUEST} " == " false" ]; then
14- SITE_VERSION=$( mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev ' (^\[|\w+:)' )
15- if [ " ${SITE_VERSION##* -} " != " SNAPSHOT" ]; then
16- # Deploy site if not a SNAPSHOT
17- git config --global user.name " travis-ci"
18- git config --global user.email
" [email protected] " 19- git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
20- mkdir -p tmp_gh-pages/$SITE_VERSION
21- mvn site -DskipTests=true
22- mvn site:stage -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION} /
23- cd tmp_gh-pages
24- cp -r ../target/staging/$SITE_VERSION /* $SITE_VERSION /
25- sed -i " s/{{SITE_VERSION}}/$SITE_VERSION /g" ${SITE_VERSION} /index.html # Update "Quickstart with Maven" to reflect version change
26- git add $SITE_VERSION
27- echo " <html><head><meta http-equiv=\" refresh\" content=\" 0; URL='http://GoogleCloudPlatform.github.io/gcloud-java/${SITE_VERSION} /index.html'\" /></head><body></body></html>" > index.html
28- git add index.html
29- echo " <html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION} /apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
30- git add apidocs/index.html
31- git commit -m " Added a new site for version $SITE_VERSION and updated the root directory's redirect."
32- git config --global push.default simple
33- git push --quiet " https://${CI_DEPLOY_USERNAME} :${CI_DEPLOY_PASSWORD} @github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
13+ SITE_VERSION=$( mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev ' (^\[|\w+:)' )
14+ if [ " ${SITE_VERSION##* -} " != " SNAPSHOT" ]; then
15+ # Deploy site if not a SNAPSHOT
16+ git config --global user.name " travis-ci"
17+ git config --global user.email
" [email protected] " 18+ git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
19+ mkdir -p tmp_gh-pages/$SITE_VERSION
20+ mvn site -DskipTests=true
21+ mvn site:stage -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION} /
22+ cd tmp_gh-pages
23+ cp -r ../target/staging/$SITE_VERSION /* $SITE_VERSION /
24+ sed -i " s/{{SITE_VERSION}}/$SITE_VERSION /g" ${SITE_VERSION} /index.html # Update "Quickstart with Maven" to reflect version change
25+ git add $SITE_VERSION
26+ echo " <html><head><meta http-equiv=\" refresh\" content=\" 0; URL='http://GoogleCloudPlatform.github.io/gcloud-java/${SITE_VERSION} /index.html'\" /></head><body></body></html>" > index.html
27+ git add index.html
28+ echo " <html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION} /apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
29+ git add apidocs/index.html
30+ git commit -m " Added a new site for version $SITE_VERSION and updated the root directory's redirect."
31+ git config --global push.default simple
32+ git push --quiet " https://${CI_DEPLOY_USERNAME} :${CI_DEPLOY_PASSWORD} @github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
3433
35- cd ..
36- utilities/update_docs_version.sh # Update version in READMEs
37- mvn clean deploy --settings ~ /.m2/settings.xml -P sign-deploy
38- else
39- mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~ /.m2/settings.xml
40- fi
34+ cd ..
35+ utilities/update_docs_version.sh # Update version in READMEs
36+ mvn clean deploy --settings ~ /.m2/settings.xml -P sign-deploy
37+ else
38+ mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~ /.m2/settings.xml
4139 fi
4240else
4341 echo " Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds."
0 commit comments