build: deterministic fix for nbgv \ race (replaces ineffective env hack)#16
Merged
Merged
Conversation
…VersionVars); revert ineffective GITHUB_ACTIONS env hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #15. That PR blanked GITHUB_ACTIONS on the Pack step, but GITHUB_ACTIONS is a default env var that cannot be overridden from a workflow (verified in CI on opc-classic: a step-level
env: GITHUB_ACTIONS: ''still reports[true]) — so #15 did not actually prevent nbgv's \ writes; the release publish that followed passed by luck and the race can recur.This replaces it with an MSBuild-layer fix: a root
Directory.Build.targetsclears nbgv's@(CloudBuildVersionVars)just before itsSetCloudBuildVersionVarstarget, so nothing is written to . Verified locally (nbgv 3.10.91): baseline build writes GitBuildVersion*/GitAssemblyInformationalVersion to ; with the fix it writes zero, and the build still succeeds. Full build parallelism is retained (no-m:1slowdown), and it covers every dotnet build/test/pack/publish. Also reverts the now-unnecessary env block on the Pack step.