-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ajay Kannan
committed
Apr 5, 2016
1 parent
b29df66
commit bd14646
Showing
4 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,16 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then | |
if [ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_BRANCH}" == "master" ]; then | ||
source ./utilities/integration_test_env.sh | ||
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)') | ||
echo "Used the maven-help-plugin to determine that the version is $SITE_VERSION" | ||
if [ "$SITE_VERSION" == "" ]; then | ||
exit 1 | ||
fi | ||
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then | ||
# Deploy site if not a SNAPSHOT | ||
# Deploy Maven artifacts and update artifact version in READMEs | ||
mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy | ||
utilities/update_docs_version.sh | ||
|
||
# Create website | ||
git config --global user.name "travis-ci" | ||
git config --global user.email "[email protected]" | ||
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages | ||
|
@@ -28,13 +36,9 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then | |
git add index.html | ||
echo "<html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html | ||
git add apidocs/index.html | ||
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect." | ||
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect. [ci skip]" | ||
git config --global push.default simple | ||
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1 | ||
|
||
cd .. | ||
utilities/update_docs_version.sh # Update version in READMEs | ||
mvn clean deploy --settings ~/.m2/settings.xml -P sign-deploy | ||
else | ||
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters