Skip to content

Commit

Permalink
Merge pull request #119 from jline/travis
Browse files Browse the repository at this point in the history
Various environment muck to setup travis-ci
  • Loading branch information
gnodet committed Apr 25, 2017
2 parents 4bda4a1 + 4da96cb commit c93c227
Show file tree
Hide file tree
Showing 10 changed files with 627 additions and 14 deletions.
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
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
20 changes: 20 additions & 0 deletions .travis.yml
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
16 changes: 16 additions & 0 deletions .travis/settings.xml
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>
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,29 @@
http://www.opensource.org/licenses/bsd-license.php
-->
Description
-----------
# Description

JLine is a Java library for handling console input. It is similar in functionality to [BSD editline](http://www.thrysoee.dk/editline/) and [GNU readline](http://www.gnu.org/s/readline/) but with additional features that bring it in par with [ZSH line editor](http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html). People familiar with the readline/editline capabilities for modern shells (such as bash and tcsh) will find most of the command editing features of JLine to be familiar.

JLine 3.x is an evolution of [JLine 2.x](https://github.com/jline/jline2).

License
-------
[![Build Status](https://travis-ci.org/jline/jline3.svg?branch=master)](https://travis-ci.org/jline/jline3)

# License

JLine is distributed under the [BSD License](http://www.opensource.org/licenses/bsd-license.php), meaning that you are completely free to redistribute, modify, or sell it with almost no restrictions.

Documentation
-------------
# Documentation

* [demos](https://github.com/jline/jline3/wiki/Demos)
* [wiki](https://github.com/jline/jline3/wiki)

Forums
------
# Forums

* [jline-users](https://groups.google.com/group/jline-users)
* [jline-dev](https://groups.google.com/group/jline-dev)

Maven Usage
-----------
# Maven Usage

Use the following definition to use JLine in your maven project:

Expand All @@ -56,12 +53,11 @@ JLine can also be used with more low-level jars:
<version>3.2.0</version>
</dependency>

Building
--------
# Building

### Requirements
## Requirements

* Maven 3.3+
* Maven 3.3+ (prefer included maven-wrapper)
* Java 8+

Check out and build:
Expand Down
109 changes: 109 additions & 0 deletions build
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
7 changes: 7 additions & 0 deletions build.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

project=jline

function command_rebuild {
mvn clean install $*
}

0 comments on commit c93c227

Please sign in to comment.