Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update travis build to publish to grails central
- Loading branch information
1 parent
96211f5
commit 0ec9f8d
Showing
4 changed files
with
51 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
language: groovy | ||
|
||
jdk: | ||
- openjdk7 | ||
- openjdk6 | ||
- oraclejdk7 | ||
|
||
script: ./grailsw clean; ./grailsw "test-app" | ||
- openjdk7 | ||
- openjdk6 | ||
- oraclejdk7 | ||
before_script: | ||
- rm -rf target | ||
script: ./travis-build.sh | ||
env: | ||
global: | ||
- secure: LrVonKDVyNsS3GrErpKeqicnRlwiXQi/LylPL0now266SM1E3clBGyZxA89g7ItqFpqQivwANysTpRL0nO8gd+EkyVG5B19P9Fq0eELLglhinU4T/T5MmWl0a2GFQSyewZDjJDrQQl1zMG3ejbl9QrFauwM4NfPcVMpyON3wjOY= | ||
- secure: eqMOkrSZOS44IZj6cK5i8/JCneWyMRCuhq7Gq+AMSIJFiw6c9ZMkooco/LLL2OV7D9f6yYmZXSDXWLv1scy9/YqrQftYrI7VyVA4Zwb4+MGag2kJ/T7jRtQ/FkYmSBex6VRuzGPN+ZyTdjuaJm3TJoCZwWfGE3Sw9OPYRRLEZAA= | ||
- secure: Ieprqq+UrMPivvu4cZXK4h+Vwl6QTTv/RYKFJddoN7FxHYoSqxXNNz3MBB0OS3DDM3jyHPLapvolWh8/4zis9hKl8R3C2Al00hiNBRtH0urx+IamvUcki6VEl/NSd99QQGCxqZn+zCH//N4nO5bS/u4fVnP5LfC+KBshdbPFrkU= |
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,4 +1,4 @@ | ||
#Grails Metadata file | ||
#Sat Sep 14 14:20:38 MST 2013 | ||
app.grails.version=2.3.6 | ||
app.grails.version=2.3.8 | ||
app.name=resources |
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,38 @@ | ||
#!/bin/bash | ||
set -e | ||
rm -rf *.zip | ||
./grailsw refresh-dependencies --non-interactive | ||
./grailsw test-app --non-interactive | ||
./grailsw package-plugin --non-interactive | ||
./grailsw doc --pdf --non-interactive | ||
if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_REPO_SLUG == 'grails-plugins/grails-resources' && $TRAVIS_PULL_REQUEST == 'false' ]]; then | ||
git config --global user.name "$GIT_NAME" | ||
git config --global user.email "$GIT_EMAIL" | ||
git config --global credential.helper "store --file=~/.git-credentials" | ||
echo "https://$GH_TOKEN:@github.com" > ~/.git-credentials | ||
filename=$(find . -name "grails-*.zip" | head -1) | ||
filename=$(basename $filename) | ||
|
||
if [[ $filename != *-SNAPSHOT* ]] | ||
then | ||
git clone https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git -b gh-pages gh-pages --single-branch > /dev/null | ||
cd gh-pages | ||
git rm -rf . | ||
cp -r ../target/docs/. ./ | ||
git add * | ||
git commit -a -m "Updating docs for Travis build: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID" | ||
git push origin HEAD | ||
cd .. | ||
rm -rf gh-pages | ||
else | ||
echo "SNAPSHOT version, not publishing docs" | ||
fi | ||
|
||
|
||
./grailsw publish-plugin --no-scm --allow-overwrite --non-interactive | ||
else | ||
echo "Not on master branch, so not publishing" | ||
echo "TRAVIS_BRANCH: $TRAVIS_BRANCH" | ||
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG" | ||
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST" | ||
fi |