Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually fix build id issue #14601

Merged
merged 1 commit into from Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion Utilities/git-version-gen.cmd
Expand Up @@ -91,7 +91,7 @@ for /F %%I IN ('call %GIT% rev-list HEAD --count') do set COMMIT_COUNT=%%I

rem // Check if the current build system sets the git branch and version.
rem // The name is misleading. This is also used for master builds.
if defined SYSTEM_PULLREQUEST_SOURCEBRANCH (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the line with the comment above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove the same comment in the else branch and adjust the echo with BUILD_SOURCEBRANCHNAME

if defined BUILD_SOURCEBRANCHNAME (

rem // This must be a CI build

Expand Down Expand Up @@ -125,6 +125,7 @@ if defined SYSTEM_PULLREQUEST_SOURCEBRANCH (
for /F %%I IN ('call %GIT% rev-parse --short^=8 HEAD') do set GIT_VERSION=%COMMIT_COUNT%-%%I
for /F %%I IN ('call %GIT% rev-parse --abbrev-ref HEAD') do set GIT_BRANCH=%%I

set GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we need this

) else (
rem // This must be a pull request or a build from a fork.
echo Assuming pull request build
Expand Down
6 changes: 0 additions & 6 deletions azure-pipelines.yml
Expand Up @@ -9,12 +9,6 @@ pr:
branches:
include:
- master
variables:
BUILD_REPOSITORY_NAME: $(Build.Repository.Name)
SYSTEM_PULLREQUEST_SOURCEBRANCH: $(System.PullRequest.SourceBranch)
SYSTEM_PULLREQUEST_PULLREQUESTID: $(System.PullRequest.PullRequestId)
BUILD_SOURCEVERSION: $(Build.SourceVersion)
BUILD_SOURCEBRANCHNAME: $(Build.SourceBranchName)
jobs:
- job: Linux_Build
strategy:
Expand Down