I'm using Hudson CI tool to do automated builds and it creates an environment variable ${env.BUILD_NUMBER}
for the build number. I want to tack this number into the css links as a query string on many pages of my site. What's the best way of getting this environment variable at build time and replacing it in the code?
The project is an ASP.NET C# website.
Example of outcome:
I commit the code:
<link href="/Content/all.min.css" rel="stylesheet" type="text/css" />
and after build, I'm left with this, if the build number is 15:
<link href="/Content/all.min.css?v=15" rel="stylesheet" type="text/css" />