calculator/build/pipelines/azure-pipelines.loc.yaml
Matt Cooley e2d6a325e3
[Build] Update localization handoff pipeline (#359)
Update the localization build so that it sends strings to our internal localization system on a nightly basis and produces a patch file which we can use to check translations back into the repo.
2019-03-22 13:59:06 -07:00

47 lines
1.4 KiB
YAML

#
# Localization
# This pipeline uploads English strings files to the localization service, downloads any translated
# files which are available, and checks them in to git. This pipeline relies on Microsoft-internal
# resources to run.
#
# Expects a variable called LocServiceKey to contain the OAuth client secret for Touchdown.
trigger: none
pr: none
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
jobs:
- job: Localize
pool:
vmImage: vs2017-win2016
variables:
skipComponentGovernanceDetection: true
steps:
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: Send resources to Touchdown Build
inputs:
teamId: 86
authId: d3dd8113-65b3-4526-bdca-a00a7d1c37ba
authKey: $(LocServiceKey)
isPreview: false
relativePathRoot: src/Calculator/Resources/en-US/
resourceFilePath: '*.resw'
outputDirectoryRoot: src/Calculator/Resources/
- script: |
cd $(Build.SourcesDirectory)
git add -A
git diff --cached --exit-code
echo '##vso[task.setvariable variable=hasChanges]%errorlevel%'
git diff --cached > $(Build.ArtifactStagingDirectory)\LocalizedStrings.patch
displayName: Check for changes and create patch file
- task: PublishPipelineArtifact@0
displayName: Publish patch file as artifact
condition: eq(variables['hasChanges'], '1')
inputs:
artifactName: Patch
targetPath: $(Build.ArtifactStagingDirectory)