Skip to content

Commit

Permalink
#1: adding release plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sorokinigor committed Jan 7, 2017
1 parent 8ad6119 commit 00332e4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jdk:
- oraclejdk8
install: true
script:
- ./gradlew -Dscala.version=${TRAVIS_SCALA_VERSION} -Dhazelcast.version=${HAZELCAST} assemble check
- ./travis-ci-build.sh
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand Down
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id 'scala'
id 'net.researchgate.release' version '2.4.0'
}

group 'com.github.sorokinigor'
version '1.0.0-SNAPSHOT'

repositories {
jcenter()
Expand Down Expand Up @@ -81,3 +81,12 @@ task sourceJar(type: Jar) {
artifacts {
archives sourceJar
}

release {
preTagCommitMessage = '[Gradle Release Plugin][ci skip] - pre tag commit: '
tagCommitMessage = '[Gradle Release Plugin][ci skip] - creating tag: '
newVersionCommitMessage = '[Gradle Release Plugin][ci skip] - new version commit: '
git {
requireBranch = 'master'
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=1.0.0-SNAPSHOT
13 changes: 13 additions & 0 deletions travis-ci-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
if [[ ${TRAVIS_BRANCH} = "master" ]]; then
./gradlew \
-Dscala.version=${TRAVIS_SCALA_VERSION} \
-Dhazelcast.version=${HAZELCAST} \
-Prelease.useAutomaticVersion=true \
assemle check release
else
./gradlew \
-Dscala.version=${TRAVIS_SCALA_VERSION} \
-Dhazelcast.version=${HAZELCAST} \
assemble check
fi

0 comments on commit 00332e4

Please sign in to comment.