forked from tjanczuk/azure-sdk-tools-xplat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
47 lines (47 loc) · 2.26 KB
/
appveyor.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
branches:
only:
- master
environment:
source: '%TEMP%/source'
files: '%TEMP%/files'
tool: '%TEMP%/tool'
github_access_token:
secure: JSOJKfdgXW09TdfN75l84f7+22GElWNgPo1Vab449RFYe8+BEbO/btueR3g0qldG
before_build:
- git clone -q --branch=master https://github.com/Visual-Studio-China/azure-xplat-cli-preprocessor %TEMP%/preprocessor
- ps: |
$solution = (ls -r $env:TEMP/preprocessor *.sln | select -first 1).FullName
nuget restore $solution
msbuild $solution /p:configuration=release /p:outputpath=$env:tool
- git clone -q --branch=master https://github.com/Visual-Studio-China/ci-scripts %TEMP%/ci-scripts
build_script:
- ps: |
npm install -g azure-cli --silent
mkdir $env:source
mkdir $env:files
azure config mode arm
azure help --json > $env:source/azure.arm.json
azure config mode asm
azure help --json > $env:source/azure.asm.json
copy $env:APPVEYOR_BUILD_FOLDER/lib/plugins.arm.json $env:source
copy $env:APPVEYOR_BUILD_FOLDER/lib/plugins.asm.json $env:source
$files_generator = (ls $env:tool *.exe).FullName
& $files_generator arm $env:source/azure.arm.json $env:source/plugins.arm.json $env:files
& $files_generator asm $env:source/azure.asm.json $env:source/plugins.asm.json $env:files
test: off
on_success:
- git clone -q --branch=master %content_repo% %TEMP%\Azure
- ps: |
$root_folder = (ls $env:TEMP\Azure -dir | select -first 1).FullName
ls $root_folder -dir | ? { $_.BaseName -ne 'specs' } | % { rm -r $_.FullName }
ls $env:files -dir | % { copy $_.FullName $root_folder -recurse -force }
ls $env:files *.yml | % { copy $_.FullName $root_folder -force }
copy -path $env:APPVEYOR_BUILD_FOLDER\Documentation -filter *.md -destination $root_folder\Conceptual -recurse -force
cd $env:TEMP/ci-scripts
./process_xplat_cli_content.ps1 $root_folder
- cd %TEMP%\Azure
- git config --global credential.helper store
- git config core.safecrlf false
- ps: ac "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):[email protected]`n"
- git add -A
- git diff --quiet --exit-code --cached || git commit --author="VSC CI Service <[email protected]>" -m "Update azure xplat cli docs." && git push origin master