2019-04-18 10:43:26 +09:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pool:
|
2020-03-04 02:41:09 +09:00
|
|
|
vmImage: 'windows-latest'
|
2019-04-18 10:43:26 +09:00
|
|
|
|
2020-03-09 17:49:36 +09:00
|
|
|
variables:
|
|
|
|
pushChanges: 'No'
|
|
|
|
|
2019-04-18 10:43:26 +09:00
|
|
|
steps:
|
|
|
|
- task: PowerShell@2
|
2020-03-09 23:35:43 +09:00
|
|
|
displayName: 'Update archives'
|
2019-04-18 10:43:26 +09:00
|
|
|
inputs:
|
2020-03-09 17:49:36 +09:00
|
|
|
targetType: 'filePath'
|
2020-03-09 23:35:43 +09:00
|
|
|
filePath: './update_archives.azure.ps1'
|
2019-04-18 10:43:26 +09:00
|
|
|
failOnStderr: true
|
2020-03-09 17:49:36 +09:00
|
|
|
workingDirectory: '.'
|
2019-04-18 10:43:26 +09:00
|
|
|
- task: PowerShell@2
|
2020-03-09 21:21:42 +09:00
|
|
|
displayName: 'Commit changes'
|
2020-03-09 17:49:36 +09:00
|
|
|
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
2019-04-18 10:43:26 +09:00
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: '$ErrorActionPreference = "Stop";
|
2019-10-13 04:05:28 +09:00
|
|
|
git config --local user.name "BotPatty";
|
|
|
|
git config --local user.email "ci@zint.ch";
|
2019-04-18 10:43:26 +09:00
|
|
|
git add ./files/GCMCodes.zip;
|
2020-03-09 23:35:43 +09:00
|
|
|
git add ./files/DolphinCodes.zip;
|
|
|
|
git commit -m "update archives [skip ci]";'
|
2019-04-18 10:43:26 +09:00
|
|
|
failOnStderr: true
|
|
|
|
workingDirectory: '.'
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Push Changes'
|
2020-03-09 17:49:36 +09:00
|
|
|
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
2019-04-18 10:43:26 +09:00
|
|
|
env:
|
|
|
|
GitHub_PAT: $(GitHub_PAT)
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: '$ErrorActionPreference = "Stop";
|
|
|
|
git push -q $(GitHub_PAT) HEAD:master;'
|
|
|
|
failOnStderr: true
|
2020-03-09 17:49:36 +09:00
|
|
|
workingDirectory: '.'
|