Closed AntoineGa closed 2 years ago
according to https://www.appveyor.com/docs/environment-variables/ it should use APPVEYOR_BUILD_VERSION environment variable
ok, according to https://andrewlock.net/version-vs-versionsuffix-vs-packageversion-what-do-they-all-mean/#how-to-set-the-version-number-when-you-build-your-app-library , we need to override version value in csproj, by AppVeyor value using /p:Version=$env:APPVEYOR_BUILD_VERSION
Ah, sorry - that's my fault.
The build script is set up to use <VersionPrefix>
from the CSPROJ file, along with a branch-dependent suffix.
For most projects that use this configuration, main
or master
is prefix-free, and another branch is used to publish pre-release packages using a branch-derived prefix.
E.g from master
you'd get 2.0.0, while by changing dev
to 2.0.1
, it would produce builds like 2.0.1-dev-12345
.
This might be overkill for this project; it could either use the AppVeyor build version mentioned above, or, the script could substitute the last field in the version from the CSPROJ with the build number (2.0.12345
, for example).
I'll send a PR based on the approach you linked above, but if you would prefer tackling it another way, just let me know 👍
Build.ps1 script is always creating 2.0.0 package ignoring App Veyor build number