Skip to content

Commit 1a301b8

Browse files
committed
chore(release): replace nebula-release-plugin by gradle-semantic-release-plugin
1 parent 6b067aa commit 1a301b8

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: java
22
sudo: false
3-
install: true
3+
install:
4+
- echo "skip default gradlew assemble"
45
script: "./buildViaTravis.sh"
56
jdk:
67
- openjdk8
@@ -21,3 +22,6 @@ cache:
2122
directories:
2223
- "$HOME/.gradle/caches/"
2324
- "$HOME/.gradle/wrapper/"
25+
branches:
26+
except:
27+
- /^v\d+\.\d+\.\d+$/

build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ buildscript {
99
classpath "com.netflix.nebula:gradle-contacts-plugin:5.0.3"
1010
classpath "com.netflix.nebula:gradle-git-scm-plugin:4.1.6"
1111
classpath "com.netflix.nebula:nebula-publishing-plugin:8.1.0"
12-
classpath "com.netflix.nebula:nebula-release-plugin:11.1.0"
12+
classpath "de.maltsev:gradle-semantic-release-plugin:0.3.4"
1313
classpath "com.netflix.nebula:nebula-bintray-plugin:7.3.0"
1414
classpath "org.ajoberstar:gradle-git-publish:2.1.1"
1515
}
1616
}
1717
description = "Set of JUnit Rules & Extensions to easily load data to test your spring-data elasticsearch-based projects"
1818

1919
allprojects {
20-
apply plugin: "nebula.release"
21-
20+
apply plugin: "de.maltsev.gradle.semanticrelease"
2221
group = 'com.github.tinesoft'
2322

2423
repositories {

buildViaTravis.sh

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
1+
12
#!/bin/bash
23
# This script will build the project.
34

45
SWITCHES="--info --stacktrace"
56

6-
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
7-
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
8-
./gradlew build $SWITCHES
9-
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
10-
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
7+
if [ "$TRAVIS_BRANCH" == "master" ]; then
8+
echo -e 'Build Release'
9+
./gradlew publishPackageToBintray gitPublishPush semanticReleasePublish $SWITCHES
10+
elif [ "$TRAVIS_BRANCH" == "develop" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
11+
echo -e 'Build Snapshot'
1112
./gradlew artifactoryPublish $SWITCHES
12-
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
13-
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
14-
case "$TRAVIS_TAG" in
15-
*-rc\.*)
16-
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true candidate gitPublishPush $SWITCHES
17-
;;
18-
*)
19-
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true final gitPublishPush $SWITCHES
20-
;;
21-
esac
2213
else
23-
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
14+
echo -e 'Build Branch ['$TRAVIS_BRANCH'] PR ['$TRAVIS_PULL_REQUEST']'
2415
./gradlew build $SWITCHES
2516
fi
2617

2718
EXIT=$?
2819

2920
exit $EXIT
30-

gradle/bintray.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ bintray {
1515
licenses = ["MIT"]
1616
labels = ["spring-data-elasticsearch", "elasticsearch", "junit4", "junit-jupiter", "testing", "testing", "integration-test"]
1717
}
18+

0 commit comments

Comments
 (0)