Just published a new VSTS extension with a couple of tasks in it. The aim to to help formalise the end of a release process. The tasks
- Allow you to set the retension ‘keep forever’ flag on a build (or all builds linked to a release)
- Update increment a build variable e.g. all or part of a version number, in a build (or all builds linked to a release)
The first just replicates functionality I used to have in house for builds
The second one is important to me as once I have released to production a version of a product I never want to generate another build with the same base version number. For example we version stamp all our DLLs/builds with a version number in form
$(Major).$(Minor).$(year:yy)$(dayofyear).(rev:r) e.g. 1.2.16170.2
Where the $(Major) and $(Minor) are build variables we set manually (we decide when we increment a major or minor release) and the second two blocks guarantee a unique build number every time. It is too easy to forget to manually increment the Major or Minor build variable during a release. This task means I don’t need to remember to set the value of one or both of these. I can either set an explicit value or just get it to auto-increment. I usually auto increment the Minor value as a default, doing a manual reset of both the Major and Minor if it is a major release.
NOTE: You do have to add some permissions to the build service account else this second task fails with a 403 permission error – so read the WIKI