Michael Teper
Michael Teper

Reputation: 4651

TeamCity: how to copy zip file as artifact with a different name (instead of including it)

My build creates a zip file, which I would like to designate as the build artifact with one exception: I would like to use the build number in the name of the zip file.

Something like:

foo/bar.zip => foo_v%build.number%.zip

Unfortunately, what I end up with is a bar.zip inside of b

Upvotes: 3

Views: 1166

Answers (2)

wal
wal

Reputation: 17749

As per my comment:

in your batch file instead of using

set zipname = bar.zip 

you can use something like

set zipname = foo_%build.number%.zip. 

If TeamCity is doing your build then you can reference this from within MSBuild using $(BUILD_NUMBER)

Upvotes: 4

Eugene Petrenko
Eugene Petrenko

Reputation: 4992

It looks like the good workaround could be to let TeamCity zip files for you

Upvotes: 0

Related Questions