Merge remote-tracking branch 'origin/main' into add-emsdk-manifest-to-sb

This commit is contained in:
Jo Shields 2023-01-31 12:57:13 -05:00
commit 80cd02ad60
6 changed files with 17 additions and 13 deletions

View file

@ -21,7 +21,7 @@ parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to push to
type: string
default: $(Build.SourceBranchName)
default: $(Build.SourceBranch)
- name: disableVmrBuild
displayName: Skip source-building the VMR

View file

@ -13,7 +13,7 @@ parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to use
type: string
default: $(Build.SourceBranchName)
default: $(Build.SourceBranch)
- name: buildName
type: string

View file

@ -10,7 +10,7 @@ parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to use
type: string
default: $(Build.SourceBranchName)
default: $(Build.SourceBranch)
- name: noPush
displayName: Don't push changes to dotnet/dotnet
@ -25,6 +25,8 @@ jobs:
- template: /eng/common/templates/variables/pool-providers.yml
- name: vmrPath
value: $(Agent.BuildDirectory)/vmr
- name: vmrBranchName
value: ${{ replace(parameters.vmrBranch, 'refs/heads/', '') }}
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNetBot-GitHub
- ${{ else }}:
@ -59,9 +61,9 @@ jobs:
git config --global user.email 'dotnet-maestro[bot]@users.noreply.github.com' && git config --global user.name 'dotnet-maestro[bot]'
git remote add dotnet 'https://$(BotAccount-dotnet-bot-repo-PAT)@github.com/dotnet/dotnet.git'
git fetch dotnet
git branch ${{ parameters.vmrBranch }}
git branch --set-upstream-to=dotnet/${{ parameters.vmrBranch }} ${{ parameters.vmrBranch }} || echo 'Branch ${{ parameters.vmrBranch }} not found in remote'
git push dotnet ${{ parameters.vmrBranch }}
git branch $(vmrBranchName)
git branch --set-upstream-to=dotnet/$(vmrBranchName) $(vmrBranchName) || echo 'Branch $(vmrBranchName) not found in remote'
git push dotnet $(vmrBranchName)
displayName: Push changes to dotnet/dotnet
workingDirectory: $(vmrPath)
condition: and(succeeded(), or(eq(variables['vmrBranch'], 'main'), startsWith(variables['vmrBranch'], 'release/')))
condition: and(succeeded(), or(eq(variables['vmrBranchName'], 'main'), startsWith(variables['vmrBranchName'], 'release/')))

View file

@ -6,7 +6,7 @@ parameters:
condition: always()
# Branch of the VMR to use (to push to for internal builds)
vmrBranch: $(Build.SourceBranchName)
vmrBranch: $(Build.SourceBranch)
# True when build is running from dotnet/dotnet directly
isBuiltFromVmr:

View file

@ -9,7 +9,7 @@ parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to use
type: string
default: $(Build.SourceBranchName)
default: $(Build.SourceBranch)
- name: skipComponentGovernanceDetection
type: boolean
@ -30,7 +30,8 @@ steps:
- ${{ if or(not(parameters.isBuiltFromVmr), eq(variables['System.TeamProject'], 'internal')) }}:
- script: |
git switch -c ${{ parameters.vmrBranch }}
branch_name=$(echo '${{ parameters.vmrBranch }}' | sed -e "s#^/refs/heads/##")
git switch -c "$branch_name"
displayName: Checkout ${{ parameters.vmrBranch }}
workingDirectory: $(Agent.BuildDirectory)/vmr

View file

@ -23,8 +23,9 @@ steps:
path: installer
- script: |
git checkout -B ${{ parameters.vmrBranch }}
echo "##vso[task.setvariable variable=vmrBranch]${{ parameters.vmrBranch }}"
branch_name=$(echo '${{ parameters.vmrBranch }}' | sed -e "s#^/refs/heads/##")
git checkout -B "$branch_name"
echo "##vso[task.setvariable variable=vmrBranch]$branch_name"
displayName: Prepare branch ${{ parameters.vmrBranch }}
workingDirectory: ${{ parameters.vmrPath }}
@ -32,7 +33,7 @@ steps:
./eng/vmr-sync.sh
--vmr ${{ parameters.vmrPath }}
--tmp $(Agent.TempDirectory)
--branch ${{ parameters.vmrBranch }}
--branch $(echo '${{ parameters.vmrBranch }}' | sed -e "s#^/refs/heads/##")
--target-ref ${{ parameters.targetRef }}
displayName: Synchronize dotnet/dotnet
workingDirectory: $(Agent.BuildDirectory)/installer