11steps :
22
3- - template : ./common/checkout.yml
3+ - checkout : self # https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#checkout
4+ clean : true # Executes: git clean -ffdx && git reset --hard HEAD
5+ submodules : recursive
6+ path : s/xamarin-macios
7+
8+ - ${{ if eq(variables['Build.Reason'], 'PullRequest') }} :
9+ - pwsh : |
10+ git config remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*'
11+ git fetch origin
12+ $branch="$(Build.SourceBranch)".Replace("merge", "head")
13+ $branch=$branch.Replace("refs", "origin")
14+ Write-Host "Checking out branch $branch"
15+ git checkout $branch
16+ $hash = git rev-parse HEAD
17+ Write-Host "##vso[task.setvariable variable=GIT_HASH;isOutput=true]$hash"
18+ name: fix_commit
19+ displayName: "Undo Github merge"
20+ workingDirectory: $(System.DefaultWorkingDirectory)
21+ - ${{ else }} :
22+ - pwsh : |
23+ $hash = git rev-parse HEAD
24+ Write-Host "##vso[task.setvariable variable=GIT_HASH;isOutput=true]$hash"
25+ name: fix_commit
26+ displayName: "Undo Github merge"
27+ workingDirectory: $(System.DefaultWorkingDirectory)
28+
429
530 - bash : |
631 make LocProject.json
732 displayName : ' Generate LocProject.json'
833 continueOnError : true
9- workingDirectory : $(Build.SourcesDirectory)\\xamarin-macios\\ tools\\devops
34+ workingDirectory : $(Build.SourcesDirectory)\\tools\\devops
1035
1136- task : PowerShell@2
1237 displayName : " Update LocProject.json"
1338 inputs :
1439 targetType : ' filePath'
15- filePath : $(Build.SourcesDirectory)\\xamarin-macios\\ tools\\devops\\automation\\scripts\\update-locproject.ps1
16- arguments : -SourcesDirectory "$(Build.SourcesDirectory)\\xamarin-macios " -LocalizeDirectory "$(Build.SourcesDirectory)\xamarin-macios\Localize\loc\{Lang}" - LocProjectPath "$(Build.SourcesDirectory)\\xamarin-macios \\Localize\\LocProject.json"
40+ filePath : $(Build.SourcesDirectory)\\tools\\devops\\automation\\scripts\\update-locproject.ps1
41+ arguments : -SourcesDirectory "$(Build.SourcesDirectory)" -LocProjectPath "$(Build.SourcesDirectory)\\Localize\\LocProject.json"
1742
1843- pwsh : |
1944 git remote remove origin
@@ -29,14 +54,14 @@ steps:
2954 git checkout -b Localization
3055 git push origin Localization
3156 displayName : " Create a new Localization branch from main"
32- workingDirectory : $(Build.SourcesDirectory)\\xamarin-macios
57+ workingDirectory : $(Build.SourcesDirectory)
3358
3459- task : OneLocBuild@2
3560 continueOnError : true
3661 env :
3762 SYSTEM_ACCESSTOKEN : $(System.AccessToken)
3863 inputs :
39- locProj : ' $(Build.SourcesDirectory)\\xamarin-macios\\ Localize\\LocProject.json'
64+ locProj : ' $(Build.SourcesDirectory)\\Localize\\LocProject.json'
4065 outDir : ' $(Build.ArtifactStagingDirectory)'
4166 ${{ if eq(variables['Build.Reason'], 'Schedule') }} :
4267 isCreatePrSelected : true
0 commit comments