Stamp build and release number to the application

Hi, What would be the best way to pass the build and release number to the releasing application through Bamboo? Just as Atlassian Bamboo version 5.1.1 build 3902 - 12 Sep 13 for Bamboo

1 answer

This widget could not be displayed.

Probably depends on your language. I would expect you could do something like assign an argument with the value of the build variable or something along those lines. In Java for example I think you'd use a -DVersionNumber=${bamboo.current.version}_build-${bamboo.buildNumber} or something like that as a build argument. Then in your source you'd need to have a way to pull "VersionNumber" into the application. like substitute into a properties file or build.xml or something along those lines. Incidentally the current.version variable is made up by me, but the buildNumber is a bamboo built in variable. Those would be passed in at compile time and presumably substituted into the application you are building. Not being a java programmer I'm speculating here, but it might give you some ideas on how to move forward. No idea what best practices are in this area.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

135 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you