-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a latest webpage generated after Travis runs #139
Merged
ajkannan
merged 4 commits into
googleapis:master
from
ajkannan:latest-webpage-via-travis
Aug 24, 2015
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
63d01ce
Creating a latest webpage generated after Travis runs. This webpage …
d2f4128
Only deploy the site and version updates if not a snapshot release
3a5d638
minor update to commit message
8c4fd41
removing extraneous piece of regex to find version number
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -8,8 +8,31 @@ echo "Travis pull request: " ${TRAVIS_PULL_REQUEST} | |
echo "Travis JDK version: " ${TRAVIS_JDK_VERSION} | ||
if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" -a "${TRAVIS_BRANCH}" == "master" -a "${TRAVIS_PULL_REQUEST}" == "false" ]; then | ||
mvn cobertura:cobertura coveralls:report | ||
mvn site-deploy -DskipTests=true --settings=target/travis/settings.xml | ||
mvn deploy -DskipTests=true -Dgpg.skip=true --settings target/travis/settings.xml | ||
|
||
# Deploy site if not a SNAPSHOT | ||
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|Download\w+:)') | ||
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then | ||
mvn site-deploy -DskipTests=true --settings=target/travis/settings.xml | ||
|
||
# Update "latest" webpage | ||
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 | ||
cd tmp_gh-pages | ||
mkdir -p site/latest/ | ||
touch site/latest/index.html | ||
echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://GoogleCloudPlatform.github.io/gcloud-java/site/${SITE_VERSION}/index.html'\" /></head><body></body></html>" > site/latest/index.html | ||
git add site/latest/index.html | ||
|
||
# Update "Quickstart with Maven" block on landing page to reflect latest version | ||
sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" site/${SITE_VERSION}/index.html | ||
git add site/${SITE_VERSION}/index.html | ||
|
||
git commit -m "Updating to reflect latest website version" | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
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 | ||
fi | ||
else | ||
echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds." | ||
fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.