-
Notifications
You must be signed in to change notification settings - Fork 47
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
Tom Reznik
committed
May 19, 2015
1 parent
af3748f
commit 33b77ef
Showing
6 changed files
with
81 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# | ||
# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo. | ||
# | ||
# Adapted from https://coderwall.com/p/9b_lfq and | ||
# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/ | ||
|
||
SLUG="contentful/contentful.java" | ||
JDK="oraclejdk8" | ||
BRANCH="master" | ||
|
||
set -e | ||
|
||
if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then | ||
echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'." | ||
elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then | ||
echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'." | ||
elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
echo "Skipping snapshot deployment: was pull request." | ||
elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then | ||
echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." | ||
else | ||
echo "Deploying snapshot..." | ||
mvn clean source:jar javadoc:jar deploy --settings=".buildscript/settings.xml" -Dmaven.test.skip=true | ||
echo "Snapshot deployed!" | ||
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,9 @@ | ||
<settings> | ||
<servers> | ||
<server> | ||
<id>sonatype-nexus-snapshots</id> | ||
<username>${env.CI_DEPLOY_USERNAME}</username> | ||
<password>${env.CI_DEPLOY_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |
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 |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
.idea/ | ||
*.iml | ||
target/ | ||
settings.xml |
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,14 +1,20 @@ | ||
language: java | ||
install: mvn install -DskipTests=true -Dgpg.skip=true | ||
sudo: false | ||
|
||
jdk: | ||
- oraclejdk7 | ||
- oraclejdk8 | ||
|
||
after_success: | ||
- .buildscript/deploy_snapshot.sh | ||
- mvn clean cobertura:cobertura coveralls:report | ||
|
||
env: | ||
global: | ||
- secure: ZkYu76rxDUUgoUSIz12CReNZHd2c5O2LBWCHnuQpqfJfcCXBr1J24F7WftiFXH+9Od43qHdF4hQ9Vy0vWEHSJ1hxZnCIy5yYsvqV4GJ94DIJhvNqmo48QPkA3tFUsqd48rEeBXMUsON30m89KDp1se2+l3UJaX+R27RUi47nraU= | ||
- secure: jKXD1hYVgJypaQHRSm4gshxMhB+T+UibaLDLCSfGWSaGzogDsWnPXf9qqG3jtozKHyH0BkANaaO6rRgNQNfbaklm4jopL1bdRkd47JO/nibNwuVcG07TQyCPQR6jv/WoRAkxXOGdMSwwS2+puM7FJqLarbzY7uBEJtNsZn5JT48= | ||
|
||
sudo: false | ||
|
||
branches: | ||
except: | ||
- gh-pages | ||
|
||
after_success: | ||
- mvn clean cobertura:cobertura coveralls:report |
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