Groovy web console

subscribe to the feed Subscribe
to this
site
test (via #groovywebconsole)
tweet this snippet Tweet
this
script

test

Published 5 months ago by aairey with tags jenkins
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def pomversion = '1.1.0-RELEASE'
def version = pomversion.split(/-/)[0]
def newversion

def (major, minor, bugfix) = version.split(/\./)

if (bugfix != '0') {
    version = major + '.' + minor + '.' + (bugfix.toInteger()+1)
}

print version