I'm a new, fresh TeamCity user, so all features are technically "new" to me. However, as it turns out, a feature was just released that I needed: File Content Replacer. Or at least I think so.
In my current setup I have a version.js file in my VCS:
window["MyPlugin"].version = "1.0.##VCS_REVISION##.##CI_BUILD_NUMBER##";
I use the File Content Replacer build feature to replace that last part with:
So far so good!
I have one relevant build step. It's an MSBuild step, but it does nothing except call a ps1, which does two relevant things:
1. Moves all js files to an "output" folder;
2. Zips all js files into a "zips" folder;
Those are also my two artifacts (an output folder, and a zip file).
However, the File Content Replacer reverts its changes, but this revert is also reflected in artifact nr 1, which are files that are not under version control (even though they are located as a subfolder of my project folder). The version.js file in the zip file is not reverted.
How do I set things up so that the artifact files are not affected by this revert? Or do I need something other than this Build Feature?
PS. If it's relevant, I'm using TeamCity 9.1.3 build 37176 running on Windows 2012 Server (VM) and the default database for evaluation purposes. I'm using TFS 2013 as my VCS.
Edit / addition: if I change artifact 1 to be "my/output/folder => all.%build.vcs.number%.zip" then the zip file will also contain a reverted state instead of the output I want.