Using custom build number in artifact name

Hi,

First post.  Love the product.  Seriously epic stuff.

I've got a Build Configuration that produces artifacts in a folder structure.  The folder structure is named according to the build number (and this is specified in the artifacts box on the general settings page).  So far I've been defining the build number format, also in the general settings page, as %version.majorminorpatch%+{0} and that's worked beautifully.

What I'd like to do now is change the version based on a file in source control.  I've managed to get the desired version into a variable easily enough, and I can even update the build number in TeamCity to match using a service message, but my artifact paths are still named according to the original build number as specified in the settings page.  I assume this is because the variable substitution in the artifact definition string is done at the beginning of the build.

Is there any way I can get the artifact names to match the "final" build number rather than the "initial" build number?

Many thanks,
Dave

5 comments
Comment actions Permalink

Dave, sorry for the delay in answering.

Could you please post the screenshot of your build configuration's "General Settings" page?

0
Comment actions Permalink

I'm finding the exact same problem. I'm begining to think the best option is to route around the problem and generate my zip in a script called by the process...

Still it does seem like a bug

0
Comment actions Permalink

Hi Nikita, thanks for the reply via twitter, I've got a few screen shots that might help. This shows the appropriate bits from the general settings then the post build configuration parameters and the final artifact name. Hope this helps
config.png

Thanks,
Doug

0
Comment actions Permalink

Thank you Dough,

Indeed, %build.number% is not resolved as expected. I've filed an issue: http://youtrack.jetbrains.com/issue/TW-23514 Please, watch/vote it.
Packing artifacts by script looks like the best workaround so far.

0
Comment actions Permalink

Sorry, was on holiday last week.  Thanks Nikita for your reply, and Doug for doing the repro legwork for me!

0

Please sign in to leave a comment.