forked from gwtbootstrap3/gwtbootstrap3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish demo app and javadoc to gh-pages snapshot upon successful build.
- Loading branch information
Showing
4 changed files
with
63 additions
and
2 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
set -ev | ||
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then | ||
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
echo "<settings><servers><server><id>ossrh</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASS}</password></server></servers></settings>" > ~/settings.xml | ||
mvn deploy --settings ~/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
set -ev | ||
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
|
||
echo -e "Publishing snapshot demo app and javadoc . . .\n" | ||
|
||
cp -R target/javadoc $HOME/javadoc-latest | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "travis-ci" | ||
|
||
# clone and build the demo application. | ||
cd $HOME | ||
git clone --quiet --branch=master https://${GH_TOKEN}@github.com/gwtbootstrap3/gwtbootstrap3-demo demo > /dev/null | ||
cd demo | ||
mvn clean package | ||
|
||
# clone the gh-pages branch. | ||
cd $HOME | ||
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/gwtbootstrap3/gwtbootstrap3-demo gh-pages > /dev/null | ||
cd gh-pages | ||
|
||
# remove the GwtBootstrap3Demo and apidocs directories from git. | ||
git rm -rf ./snapshot/GwtBootstrap3Demo | ||
git rm -rf ./snapshot/apidocs | ||
|
||
# copy the new GwtBootstrap3Demo and apidocsto the snapshot dir. | ||
cp -Rf $HOME/javadoc-latest ./snapshot/apidocs | ||
unzip $HOME/demo/target/gwtbootstrap3-demo-*.war -d ./snapshot/ | ||
|
||
git add -f . | ||
git commit -m "Lastest javadoc and demo app on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" | ||
git push -fq origin gh-pages > /dev/null | ||
|
||
echo -e "Published Javadoc and demo application to gh-pages.\n" | ||
|
||
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