-
Notifications
You must be signed in to change notification settings - Fork 217
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 #119 from jline/travis
Various environment muck to setup travis-ci
- Loading branch information
Showing
10 changed files
with
627 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
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 @@ | ||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip |
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,20 @@ | ||
language: java | ||
|
||
env: | ||
global: | ||
- secure: 'PajKlInMvlkhMNFPSvwgOr8GnvQ/1/uAm+ZVbFCFW3CS40CdaSwCT5vWiyENoQsbAjXMVHFzpUSIHjXpLCA7jl3c0AM1uzjXTsQGtFVyxLPn1f7K0ePy0g3EKZPka4SGVpSG0GwW6kfWVfPNPDEIZJM0ZQRvta4/aOAldFzcb9X7hKjM2H4PbgYEhVfNP50QGsuonZf7PLu4Bl5bNH8wXIGn5iNGPauYa/mlFsI5Gsar0F4PJaVd7efszh+lPAHUaW/DUpoN0S9gM18tC28R7OIDvuniFPzIWVPm2P0aIYAktVf+GVTgACzuL7/D6OhxEyyCTqdet2jMFFkP1wcEvugPsArkZRPeqwuA+2XXV9amWvvSopkMJIkad6TnfK+zfVkMH0vXa/cu/a/5WPE2QS5VhCXocVze3sOUlncifxftd57kENley29+K57K4BWhxtsb/Uh1nvUpxgXnodgWQ7M5i0e4/iX14oVjCic1VDIUYFagGl1texVJ1jTsvflO2LEozof0f+ZTK1r7xRKabIj4YOugA5dz658ZdjZrds5n88Uv6KVD1T2ixhhnPVxeimpHdu5j43G9P7nR7T/n/nl50CsTOtS7Hnrh6KdUGMvBm42nFKra9nyInea5kwkMhHu182+01t+jYF3y/TIeU55nGjiXJPEf/pQK6nzxDV8=' | ||
- secure: 'HqKdgQbxwuP0HkTzklTofLU4Wv7a1uM1BU5B0C7Hk7JuEmMBH0iC6VcyWd6C2zQgm1jRqZ6Dly9t7iwtmR7eDdOSpA0X2LsZuZZMuYzrQVW9M7i8qzNECl80UvOKnEiqlQD2qxUDCp+hX0UiOuAF4DX9upIo7SMplWYdsDHWpcIRz+b5HUMnnS32gBaHZ2Y02FS5LMOI9HV0UdPXSwTI4LzrztAYEj8yGn8inYwOTD5JTC9rF8It58zCtRJ1e9cM7BINOa8Ri0TpVOJGJlze9oNKEKnBS+zTRCphsBlomkyNBxknm86yXr0smGqiMp4wqrG8G45JNN7034koU5b+m796sf6fFFV8rEdkQDdkrbBSFlDwEuFc+yWDFhDJqQCJRKbBfL+n2tJJAyLse/OtrYvizdMrBX1tnhp/lrBEVa3GrtCa1B5a3XrV20sdowLveQERnMPfJDcTKP60FB6lQIAHg/yNjSFV84SmHrisMIH6xbkZHZsh50foUlo73XaGRa8XhBOTcJ9Gh6pwcrNLv4rCUv4UE+CV7AUC90jEnbHrJbHtbCo/QOJgQ7cT83kzA7iP3JDppO79MV/6QfEHqRNTt/XkzhIt+PrGfUakTNe32lB6uFni+jv8/xyjGsgFDjOJqWoWIDUCjUTYrjx3iv702Q0dQLrau05eEuzf53g=' | ||
- MAVEN_SETTINGS='.travis/settings.xml' | ||
- MAVEN_OPTIONS="-V -B -s $MAVEN_SETTINGS" | ||
|
||
branches: | ||
except: | ||
- /^release-.*$/ | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
# FIXME: for now just complain; do not fail as the present license headers have inconsistent date ranges | ||
install: ./build ci-prepare -Dlicense.failIfMissing=false $MAVEN_OPTIONS | ||
|
||
script: ./build ci-build $MAVEN_OPTIONS |
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> | ||
<servers> | ||
<server> | ||
<id>sonatype-nexus-snapshots</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
|
||
<server> | ||
<id>sonatype-nexus-staging</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_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
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,109 @@ | ||
#!/bin/bash -e | ||
basename=`basename $0` | ||
dirname=`dirname $0` | ||
dirname=`cd "$dirname" && pwd` | ||
cd "$dirname" | ||
|
||
source build.config | ||
|
||
# load optional config | ||
if [ -f ./build.rc ]; then | ||
source ./build.rc | ||
fi | ||
|
||
# show message and exit | ||
function die { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
# show usage and exit | ||
function usage { | ||
echo "usage: $basename $*" | ||
exit 2 | ||
} | ||
|
||
# run self | ||
function self { | ||
$0 $* | ||
} | ||
|
||
# run maven | ||
function mvn { | ||
./mvnw $* | ||
} | ||
|
||
command="$1"; shift | ||
case "$command" in | ||
# change the version of the project | ||
change-version) | ||
newVersion="$1" | ||
if [ -z "$newVersion" ]; then | ||
usage "$command <version>" | ||
fi | ||
|
||
mvn org.eclipse.tycho:tycho-versions-plugin:0.25.0:set-version \ | ||
-Dtycho.mode=maven \ | ||
-Dartifacts=${project} \ | ||
-Dproperties=${project}.version \ | ||
-DnewVersion="$newVersion" | ||
;; | ||
|
||
# check license headers | ||
license-check) | ||
mvn -Plicense-check -N $* | ||
;; | ||
|
||
# format license headers | ||
license-format) | ||
mvn -Plicense-format -N $* | ||
;; | ||
|
||
# prepare CI build | ||
ci-prepare) | ||
self license-check $* | ||
;; | ||
|
||
# build for CI | ||
ci-build) | ||
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then | ||
goal=install | ||
else | ||
goal=deploy | ||
fi | ||
mvn clean ${goal} $* | ||
;; | ||
|
||
# release automation | ||
release) | ||
version="$1" | ||
nextVersion="$2" | ||
if [ -z "$version" -o -z "$nextVersion" ]; then | ||
usage "$command <version> <next-version>" | ||
fi | ||
releaseTag="release-$version" | ||
|
||
# update version and tag | ||
self change-version "$version" | ||
git commit -a -m "update version: $version" | ||
git tag $releaseTag | ||
|
||
# deploy release | ||
mvn -Pbuildsupport-release clean deploy | ||
|
||
# update to next version | ||
self change-version "$nextVersion" | ||
git commit -a -m "update version: $nextVersion" | ||
;; | ||
|
||
*) | ||
# attempt to lookup command function | ||
fn="command_$command" | ||
if [ "$(type -t $fn)" = 'function' ]; then | ||
$fn $* | ||
else | ||
# give up and complain | ||
usage "<command> [options]" | ||
fi | ||
;; | ||
esac |
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,7 @@ | ||
#!/bin/bash | ||
|
||
project=jline | ||
|
||
function command_rebuild { | ||
mvn clean install $* | ||
} |
Oops, something went wrong.