Working YAML example for Packaging/Versioning using byBuildNumber Does anyone have a working azure-pipelines.yml with this versioning scheme? Googling for the literal string "versioningScheme: byBuildNumber" returns a single result. Furthermore, am I suppose to just set that to 1.0.$(Rev:r), or to $(Major).$(Minor).$(rev.r)? I'm afraid that would just interpret it literally. It looks like I want to use versioningScheme: byBuildNumber, but I'm not quite sure how to set the build number, I think it pulls it from the BUILD_BUILDNUMBER environment variable, but I can't find a way to set environment variables, only script variables. You should use byEnvVar as described above, and set the environmentĪgain, no example is provided. Select byBuildNumber, the task will extract a dotted version, 1.2.3.4Īnd use only that, dropping any label. That your build number is a proper SemVer e.g. A link to learn more takes you to this documentation, where it says this:įor byBuildNumber, the version will be set to the build number, ensure ![]() It will keep the major and minor versions constant, until youĬhange them manually in the build pipeline.īut that's all they say about it, no example is provided. Increment the build number and the package version with a new patch ![]() $(Major).$(Minor).$(rev.r), where Major and Minor are two variablesĭefined in the build pipeline. ![]() In particular, I want to implement this one: In this documentation, it lists a couple different ways to automatically generate SemVer strings. I'm setting up an Azure Pipelines build that needs to package a C#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |