diff --git a/build.gradle b/build.gradle index e277b2d7..a1df7419 100644 --- a/build.gradle +++ b/build.gradle @@ -107,13 +107,15 @@ task incrementBuildNumber() { } } -task buildnumber << { - env = System.getenv() +task ci_incrementBuildNumber() { + doLast { + // increment + config.build_number = $ { System.getenv().BUILD_NUMBER } - println env.get(BUILD_NUMBER) - - env.each { - key, value -> println "$key = $value"; + // write back to the file + configFile.withWriter { + config.toProperties().store(it, "") + } } } @@ -129,4 +131,17 @@ task release(type: Copy) { onlyIf { return project.ee3_release_loc != "." } -} \ No newline at end of file +} +task ci_release(type: Copy) { + dependsOn "ci_incrementBuildNumber" + dependsOn "signJar" + + eachFile { file -> + logger.info "copying ${file}" + } + + // only if the release location isn't empty. + onlyIf { + return project.ee3_release_loc != "." + } +}