calculator/build/pipelines/azure-pipelines.loc.yaml

55 lines
1.5 KiB
YAML
Raw Normal View History

2019-01-29 08:24:37 +08:00
#
# 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.
schedules:
- cron: "0 5 * * *"
displayName: Daily sync
branches:
include:
- master
2021-03-25 12:16:39 +08:00
always: true
2019-01-29 08:24:37 +08:00
trigger: none
pr: none
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
jobs:
- job: Localize
pool:
vmImage: windows-2022
variables:
skipComponentGovernanceDetection: true
2019-01-29 08:24:37 +08:00
steps:
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: Send resources to Touchdown Build
2019-01-29 08:24:37 +08:00
inputs:
teamId: 86
authId: bf6d44ca-3210-4cfa-833f-c79f164ea27b
authKey: $(LocServiceKey)
isPreview: false
relativePathRoot: src/Calculator/Resources/en-US/
resourceFilePath: '*.resw'
outputDirectoryRoot: src/Calculator/Resources/
2019-01-29 08:24:37 +08:00
- 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')
2019-01-29 08:24:37 +08:00
inputs:
artifactName: Patch
targetPath: $(Build.ArtifactStagingDirectory)