Groovy web console

subscribe to the feed Subscribe
to this
site

WhichMachine

Published 3 months ago by ReneAtAround
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
int NUMBER_OF_MACHINES = 2
int dayOfYear = Calendar.getInstance().get(Calendar.DAY_OF_YEAR)
print "machineTarget = build${1 + ((1 + dayOfYear) % NUMBER_OF_MACHINES)}\n"
print "machineSource = build${1 + (dayOfYear % NUMBER_OF_MACHINES)}"