Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit c5765c8

Browse files
committed
Add release plugin configuration for automated versioning
1 parent cc46beb commit c5765c8

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ buildscript {
2626
}
2727
dependencies {
2828
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
29+
classpath 'net.researchgate:gradle-release:2.7.0'
2930
}
3031
}
3132

@@ -132,6 +133,14 @@ subprojects {
132133
}
133134
}
134135

136+
release {
137+
tagTemplate = 'v${version}'
138+
failOnPublishNeeded = false
139+
ignoredSnapshotDependencies = ['com.graphql-java-kickstart:graphql-spring-boot']
140+
}
141+
142+
afterReleaseBuild.dependsOn bintrayUpload
143+
135144
bintray {
136145
user = System.env.BINTRAY_USER ?: project.findProperty('BINTRAY_USER') ?: ''
137146
key = System.env.BINTRAY_PASS ?: project.findProperty('BINTRAY_PASS') ?: ''

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
#
1919

20-
PROJECT_VERSION = 5.0.3
20+
PROJECT_VERSION = 5.0.3-SNAPSHOT
2121
PROJECT_GROUP = com.graphql-java-kickstart
2222
PROJECT_NAME = graphql-spring-boot
2323
PROJECT_DESC = GraphQL Spring Framework Boot

travis-build.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
#!/bin/bash
22
set -ev
33

4+
saveGitCredentials() {
5+
cat >$HOME/.netrc <<EOL
6+
machine github.com
7+
login ${GITHUB_USERNAME}
8+
password ${GITHUB_TOKEN}
9+
10+
machine api.github.com
11+
login ${GITHUB_USERNAME}
12+
password ${GITHUB_TOKEN}
13+
EOL
14+
chmod 600 $HOME/.netrc
15+
}
16+
417
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && [ "${RELEASE}" = "true" ]; then
518
echo "Deploying release to Bintray"
19+
saveGitCredentials
620
git checkout -f ${TRAVIS_BRANCH}
7-
./gradlew clean assemble && ./gradlew check --info && ./gradlew bintrayUpload -x check --info
21+
./gradlew clean assemble -Prelease.useAutomaticVersion=true && ./gradlew check --info
822
else
923
echo "Verify"
1024
./gradlew clean assemble && ./gradlew check --info

0 commit comments

Comments
 (0)