Skip to content

Commit

Permalink
Gradle Deployment #80
Browse files Browse the repository at this point in the history
  • Loading branch information
jjames967 committed Oct 7, 2015
1 parent f46cc59 commit 7db86d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 8 additions & 9 deletions deploy.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ nexus {
}

task deploy() {
def updatedVersion = version
if (project.hasProperty("version")) {
ant.propertyfile(
file: "gradle.properties") {
entry( key: "version", value: "$version")
if (release.toBoolean() == true) {
def strippedSnapshotVersion = version.replaceFirst(/-SNAPSHOT/, '')
ant.propertyfile(file: "gradle.properties") {
entry( key: "version", value: "$strippedSnapshotVersion")
}
}
if (project.hasProperty("snapshot")) {
ant.propertyfile(
file: "gradle.properties") {
entry( key: "version", value: "$version-SNAPSHOT")
else if (snapshot.toBoolean() == true) {
def strippedSnapshotVersion = version.replaceFirst(/-SNAPSHOT/, '')
ant.propertyfile(file: "gradle.properties") {
entry( key: "version", value: "$strippedSnapshotVersion-SNAPSHOT")
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#Tue, 06 Oct 2015 18:40:15 -0600
#Tue, 06 Oct 2015 19:41:44 -0600
group=com.github.cflint
version=0.5.0
name=CFLint
release=false
snapshot=false

0 comments on commit 7db86d8

Please sign in to comment.