-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from hazendaz/master
Reworking builds
- Loading branch information
Showing
5 changed files
with
68 additions
and
7 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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# Get Project Repo | ||
mybatis_repo=$(git config --get remote.origin.url 2>&1) | ||
echo "Repo detected: ${mybatis_repo}" | ||
|
||
# Get the Java version. | ||
# Java 1.5 will give 15. | ||
# Java 1.6 will give 16. | ||
# Java 1.7 will give 17. | ||
# Java 1.8 will give 18. | ||
VER=`java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q'` | ||
echo "Java detected: ${VER}" | ||
|
||
# We build for several JDKs on Travis. | ||
# Some actions, like analyzing the code (Coveralls) and uploading | ||
# artifacts on a Maven repository, should only be made for one version. | ||
|
||
# If the version is 1.6, then perform the following actions. | ||
# 1. Upload artifacts to Sonatype. | ||
# 2. Use -q option to only display Maven errors and warnings. | ||
# 3. Use --settings to force the usage of our "settings.xml" file. | ||
|
||
# If the version is 1.7, then perform the following actions. | ||
# 1. Notify Coveralls. | ||
# 2. Deploy site | ||
# 3. Use -q option to only display Maven errors and warnings. | ||
|
||
if [ "$mybatis_repo" == "https://github.com/mybatis/ehcache-cache.git" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
if [ $VER == "16" ]; then | ||
mvn clean deploy -q --settings ./travis/settings.xml | ||
echo -e "Successfully deployed SNAPSHOT artifacts to Sonatype under Travis job ${TRAVIS_JOB_NUMBER}" | ||
elif [ $VER == "17" ]; then | ||
mvn clean test jacoco:report coveralls:report -q | ||
echo -e "Successfully ran coveralls under Travis job ${TRAVIS_JOB_NUMBER}" | ||
# various issues exist currently in building this so comment for now | ||
# mvn site site:deploy -q | ||
# echo -e "Successfully deploy site under Travis job ${TRAVIS_JOB_NUMBER}" | ||
fi | ||
else | ||
echo "Travis build skipped" | ||
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${env.CI_DEPLOY_USERNAME}</username> | ||
<password>${env.CI_DEPLOY_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>gh-pages</id> | ||
<username>git</username> | ||
<password>${env.CI_SITE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |