Skip to content

Conversation

Ninho67
Copy link

@Ninho67 Ninho67 commented Aug 25, 2025

Description

Added support for GIT_BRANCH environment variable in Azure pipeline builds with gitversion 5.x

Related Issue

#4662

Motivation and Context

Solves multi-repo build situations on azure pipelines without being forced to upgrade to gitversion 6.x,
Upgrading to gitversion 6.x breaks the versionning locally on Visual Studio (Windows).

How Has This Been Tested?

Tested on azure by adding the env variable GIT_BRANCH as follows:

- task: DotNetCoreCLI@2
  displayName: 'Build project 1'
  env:
     GIT_BRANCH: '${{parameters.SpotBranch}}'
  ...

Screenshots (if appropriate):

Checklist:

  • [ x] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have added tests to cover my changes.
  • [x ] All new and existing tests passed.

@Ninho67 Ninho67 changed the base branch from main to support/5.x August 25, 2025 09:00
@Ninho67 Ninho67 changed the title GIT_BRANCH override supported on azure pipelines GIT_BRANCH override supported on azure pipelines with gitversion 5.x Aug 25, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant