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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.