Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit eb37aee

Browse files
authored
Merge pull request #11 from launchdarkly/dr/autoRelease
Better release process- no more clicking around Nexus web ui.
2 parents 4341b39 + 682b015 commit eb37aee

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@
1313
.gradle/
1414
build/
1515
bin/
16-
gradle.properties
1716

1817
classes/

build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ apply plugin: 'org.ajoberstar.github-pages'
44
apply plugin: 'signing'
55
apply plugin: 'idea'
66
apply plugin: 'com.github.johnrengelman.shadow'
7+
apply plugin: 'io.codearte.nexus-staging'
78

89
configurations.all {
910
// check for updates every build for dependencies with: 'changing: true'
@@ -19,7 +20,7 @@ repositories {
1920

2021
allprojects {
2122
group = 'com.launchdarkly'
22-
version = "2.2.3"
23+
version = "{$version}"
2324
sourceCompatibility = 1.7
2425
targetCompatibility = 1.7
2526
}
@@ -60,6 +61,7 @@ buildscript {
6061
dependencies {
6162
classpath 'org.ajoberstar:gradle-git:1.5.0-rc.1'
6263
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
64+
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.8.0"
6365
}
6466
}
6567

@@ -186,6 +188,10 @@ idea {
186188
}
187189
}
188190

191+
nexusStaging {
192+
packageGroup = "com.launchdarkly"
193+
}
194+
189195
uploadArchives {
190196
repositories {
191197
mavenDeployer {

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version=2.2.3
2+
ossrhUsername=
3+
ossrhPassword=

scripts/release.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
# This script updates the version for the java-client library and releases the artifact + javadoc
3+
# It will only work if you have the proper credentials set up in ~/.gradle/gradle.properties
4+
5+
# It takes exactly one argument: the new version.
6+
# It should be run from the root of this git repo like this:
7+
# ./scripts/release.sh 4.0.9
8+
9+
# When done you should commit and push the changes made.
10+
11+
set -uxe
12+
echo "Starting java-client release."
13+
14+
VERSION=$1
15+
16+
#Update version in gradle.properties file:
17+
sed -i '' "s/^version.*$/version=${VERSION}/" gradle.properties
18+
./gradlew clean test install sourcesJar javadocJar uploadArchives closeAndReleaseRepository
19+
./gradlew publishGhPages
20+
echo "Finished java-client release."

0 commit comments

Comments
 (0)