Wrong build number being inserted
Hi
We are using a Powershell script to replace the build number in an angular config file however even though the build number in TC is reporting as #44 when the replacement occurs it replaces it with #42 which is the previous successful build. The powershell looks like this:
$VersionNumber = %system.build.number%
$filePath = ".\Test.DocumentControl.Websites.Portal\src\app\app.config.ts"
(GC $filePath).Replace("{buildnumber}", "$versionNumber") | Set-Content $filePath
I'm at a bit of a loss?!
Thanks
Please sign in to leave a comment.
Can you check the build parameters and see what "system.build.number" is? Also, are you modifying the value of the parameter at some point?
Hi. I resolved this issue by deleting the files from the folder before rebuilding. This seems to have done the trick.