Skip to content

Commit c85a3f3

Browse files
committed
Merge pull request #34 from palantir/feature/make-version-code-make-more-sense
Feature/make version code make more sense
2 parents 97f0d60 + addfb90 commit c85a3f3

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ apply from: "gradle/idea.gradle"
2222
apply plugin: 'java'
2323

2424
group = 'com.palantir.docker.compose'
25-
version "git describe --tags --dirty".execute().text.trim().replaceAll(/^v/, '')
25+
version "git describe --tags --dirty".execute().text.trim()
2626

2727
apply plugin: 'com.palantir.baseline-checkstyle'
2828
apply plugin: 'com.palantir.baseline-eclipse'

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ general:
2121

2222
deployment:
2323
release:
24-
tag: /v?[0-9]+(\.[0-9]+)+/
24+
tag: /[0-9]+(\.[0-9]+)+/
2525
commands:
2626
- ./gradlew -i bintrayUpload
2727

gradle/publish.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,16 @@ bintray {
5858
}
5959

6060
bintrayUpload.onlyIf {
61-
System.out.println("Publishing with project version: " + project.version.toString())
62-
System.env.BINTRAY_USER && System.env.BINTRAY_KEY && project.version.toString() ==~ /v?\d+\.\d+\.\d+/
61+
println "Attempting to publish with project version: " + project.version.toString()
62+
63+
def versionIsInCorrectFormat = project.version.toString() ==~ /\d+\.\d+\.\d+/
64+
65+
if (!versionIsInCorrectFormat) {
66+
println "Cannot publish project with version " + project.version.toString() +
67+
"; it must be in form 'major.minor.patch'"
68+
}
69+
70+
System.env.BINTRAY_USER && System.env.BINTRAY_KEY && versionIsInCorrectFormat
6371
}
6472

6573
bintrayUpload.dependsOn 'generatePomFileForBintrayPublication', 'build'

0 commit comments

Comments
 (0)