From 519f2d758b26b352e39f725472d273a9cd9290af Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Thu, 4 Aug 2022 14:40:25 -0400 Subject: [PATCH 1/2] [Localization] Add OneLocBuild job A new job has been added to run the `OneLocBuild@2` task on every commit to main. This task produces files needed by the localization team. For more details on this process, see the [OneLocBuild documentation][0]. [0]: https://aka.ms/OneLocBuild --- Localize/LocProject.json | 14 +++++++++++++ azure-pipelines.yml | 44 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 Localize/LocProject.json diff --git a/Localize/LocProject.json b/Localize/LocProject.json new file mode 100644 index 00000000..bbe536fa --- /dev/null +++ b/Localize/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "VS_Main_Languages", + "LocItems": [ + { + "CopyOption": "LangIDOnName", + "SourceFile": ".\\LibZipSharp\\Properties\\Resources.resx", + "OutputPath": ".\\LibZipSharp\\Properties" + } + ] + } + ] + } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 47fcfc3c..c4b26299 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -257,8 +257,8 @@ stages: displayName: "Run Tests under .net Core" inputs: command: test - arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll -' + arguments: 'LibZipSharp.UnitTest\bin\Release\netcoreapp3.1\LibZipSharp.UnitTest.dll' + - stage: Publish dependsOn: Test condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates @@ -267,3 +267,43 @@ stages: parameters: signListPath: 'SignList.xml' condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') + + - stage: Localization + dependsOn: [] + condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/dev/pjc/oneloc')) + jobs: + - job: OneLocBuild + displayName: OneLocBuild + pool: VSEngSS-MicroBuild2022-1ES + timeoutInMinutes: 30 + variables: + - group: Xamarin-Secrets + workspace: + clean: all + steps: + - checkout: self + clean: true + + - task: OneLocBuild@2 + displayName: OneLocBuild + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: Localize/LocProject.json + outDir: $(Build.StagingDirectory) + packageSourceAuth: patAuth + patVariable: $(OneLocBuild--PAT) + isCreatePrSelected: true + repoType: gitHub + gitHubPatVariable: $(github--pat--vs-mobiletools-engineering-service2) + prSourceBranchPrefix: locpr + isShouldReusePrSelected: true + isAutoCompletePrSelected: false + isUseLfLineEndingsSelected: true + + - task: PublishBuildArtifacts@1 + displayName: Publish Localization Files + inputs: + PathtoPublish: $(Build.StagingDirectory)/loc + ArtifactName: Loc + condition: succeededOrFailed() From d944518b2c522d8f9bbec4c1f5bb40593021a8af Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Mon, 8 Aug 2022 17:51:20 -0400 Subject: [PATCH 2/2] Rune OneLocBuild on main --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4b26299..e4d579dc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -270,7 +270,7 @@ stages: - stage: Localization dependsOn: [] - condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/dev/pjc/oneloc')) + condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) jobs: - job: OneLocBuild displayName: OneLocBuild