Skip to content

Commit

Permalink
compute latest released version
Browse files Browse the repository at this point in the history
  • Loading branch information
daspilker committed May 10, 2016
1 parent fa891a6 commit b2c747e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion RELEASING.md
Expand Up @@ -19,7 +19,6 @@ password=IHeartJenkins
* Increment the version in gradle.properties and append "-SNAPSHOT": _echo "version=1.15-SNAPSHOT">gradle.properties_
* Update the release notes, add the next version: `* 1.15 (unreleased)`
* Add the new snapshot version to the API viewer in `job-dsl-api-viewer/index.html`
* Update latest the version for downloading API JSON files in `job-dsl-api-viewer/build.gradle`
* Commit the updated version number: _git commit -S -am "Bumping to next rev"_
* Push the two new commit and the tag back to GitHub: _git push --tags && git push_
* Close all resolved issues in [JIRA](https://issues.jenkins-ci.org/browse/JENKINS/component/16720)
Expand Down
4 changes: 3 additions & 1 deletion job-dsl-api-viewer/build.gradle
Expand Up @@ -35,7 +35,9 @@ task downloadUpdateCenter(type: Download) {
onlyIfNewer true
}

(38..46).each { minorVersion ->
def tokenizedVersion = version.split(/\.|-/) // version can be either x.y or x.y-SNAPSHOT
int latestVersion = (tokenizedVersion[1] as int) - 1 // extract minor version and decrease by 1 to get the latest released version
(38..latestVersion).each { minorVersion ->
def version = "1.${minorVersion}"
task "downloadData-${version}"(type: Download) {
src "http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/job-dsl-core/${version}/job-dsl-core-${version}-apidoc.json"
Expand Down

0 comments on commit b2c747e

Please sign in to comment.