Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context 🌆
Our build pipeline was broken, and we didn't realize it until we needed to make a change to this library. We want to initiate nightly builds so we can detect a broken pipeline early and fix it before it becomes a problem. We also could not publish from our branch after the first build of that branch.
Details 🔍
In order to create branch builds and nightly builds, we need to override the
MinVerDefaultPreReleaseIdentifiers. The documentation implies we can do this with an environment variable. Unfortunately, when I do this, theMinVerDefaultPreReleaseIdentifiersis ignored completely. Creating a conditional property group in thecsprojfile works reliably and allows us to maintain a fairly clean CI process.The alternative was to set
MINVERVERSIONOVERRIDE, but this required us to derive the current version number, which was generally more complicated.I would also like to ignore the height value when creating version numbers. This value is not calculated correctly for GitHub PRs, which is why we need to do this customer naming for our branch builds. If I set
MinVerIgnoreHeightin thecsprojfile it completely ignored theMinVerDefaultPreReleaseIdentifiers. As this value can only change by pushing a new tag or merging into master, it is acceptable.Branch build
Nightly build
With ignore height turn on in csproj
[sc-131121]