diff options
author | Steve Dower <steve.dower@microsoft.com> | 2018-09-24 11:44:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 11:44:50 (GMT) |
commit | 57675090b0fe7d6c7d72e56384dc2ff6798f1723 (patch) | |
tree | 17a838f9f8c953cef01ccc2d32f00be980c8c8e3 /.azure-pipelines/prebuild-checks.yml | |
parent | 2d3ff2b5ea6c903973f99d2155c9c1b60591dceb (diff) | |
download | cpython-57675090b0fe7d6c7d72e56384dc2ff6798f1723.zip cpython-57675090b0fe7d6c7d72e56384dc2ff6798f1723.tar.gz cpython-57675090b0fe7d6c7d72e56384dc2ff6798f1723.tar.bz2 |
bpo-34582: Update syntax of Azure Pipelines builds (GH-9521)
Diffstat (limited to '.azure-pipelines/prebuild-checks.yml')
-rw-r--r-- | .azure-pipelines/prebuild-checks.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.azure-pipelines/prebuild-checks.yml b/.azure-pipelines/prebuild-checks.yml new file mode 100644 index 0000000..30ff642 --- /dev/null +++ b/.azure-pipelines/prebuild-checks.yml @@ -0,0 +1,36 @@ +steps: +- checkout: self + fetchDepth: 5 + +- script: echo "##vso[task.setvariable variable=diffTarget]HEAD~1" + displayName: Set default diff target + +- script: | + git fetch -q origin $(System.PullRequest.TargetBranch) + echo "##vso[task.setvariable variable=diffTarget]HEAD \$(git merge-base HEAD FETCH_HEAD)" + displayName: Fetch comparison tree + condition: and(succeeded(), variables['System.PullRequest.TargetBranch']) + +- script: | + if ! git diff --name-only $(diffTarget) | grep -qE '(\.rst$|^Doc|^Misc)' + then + echo "No docs were updated: docs.run=false" + echo "##vso[task.setvariable variable=run;isOutput=true]false" + else + echo "Docs were updated: docs.run=true" + echo "##vso[task.setvariable variable=run;isOutput=true]true" + fi + displayName: Detect documentation changes + name: docs + +- script: | + if ! git diff --name-only $(diffTarget) | grep -qvE '(\.rst$|^Doc|^Misc)' + then + echo "Only docs were updated: tests.run=false" + echo "##vso[task.setvariable variable=run;isOutput=true]false" + else + echo "Code was updated: tests.run=true" + echo "##vso[task.setvariable variable=run;isOutput=true]true" + fi + displayName: Detect source changes + name: tests |