forked from microsoft/winget-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.loc.yml
63 lines (56 loc) · 2.12 KB
/
azure-pipelines.loc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
# Localization
# This pipeline uploads English strings files to the localization service, downloads any translated
# files which are available, and checks them into 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: windows-2019
variables:
skipComponentGovernanceDetection: true
tdbuildTeamId: 8343
tdbuildAuthId: 2796a411-f030-46c1-ae3e-ab56f60ea523
tdbuildAuthKey: $(LocServiceKey)
steps:
# Upload client resources
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: Send resources to Touchdown Build
inputs:
teamId: $(tdbuildTeamId)
authId: $(tdbuildAuthId)
authKey: $(tdbuildAuthKey)
isPreview: false
relativePathRoot: src\AppInstallerCLIPackage\Shared\Strings\en-us
resourceFilePath: '*.resw'
outputDirectoryRoot: localization/Resources/
# Upload Group Policy ADML
# Do it as a separate step as we need the result in a different location
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: Send ADML to Touchdown Build
inputs:
teamId: $(tdbuildTeamId)
authId: $(tdbuildAuthId)
authKey: $(tdbuildAuthKey)
isPreview: false
relativePathRoot: doc\admx\en-US
resourceFilePath: '*.adml'
outputDirectoryRoot: Localization\Policies\
- 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)