Created
July 13, 2016 16:53
-
-
Save nblair/d87a44f0300d4aca3b058f2d0cb7bd19 to your computer and use it in GitHub Desktop.
Gradle task to assist in release management, to be paired with: https://gist.github.com/nblair/53f44e08104354dd078e6104d7dae4a8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Task executed by Jenkins on merges to master to confirm that we appropriately track the last | |
* released version. | |
* Typical commands executed by this Jenkins job, in order: | |
* 1. gradlew clean updateProjectLast | |
* 2. git commit -am "Tracking last released version" | |
* 3. gradlew bootRepackage uploadArchives | |
*/ | |
task updateProjectLast() { | |
doLast { | |
Properties properties = new Properties(); | |
properties.load(new FileInputStream("project.last")) | |
properties.setProperty("last.released.version", getVersion()) | |
properties.store(new FileOutputStream("project.last"), "this file is automatically managed, do not edit") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment