onnxruntime/tools/ci_build/github/azure-pipelines/templates/set-nightly-build-option-variable-step.yml
edgchen1 737c22a911
Refactor Python packaging builds (#4283)
Reuse the same template file for all Python packaging builds.
2020-06-22 17:13:22 -07:00

15 lines
501 B
YAML

# sets the NightlyBuildOption variable if the NIGHTLY_BUILD environment variable is appropriately set
steps:
- task: PythonScript@0
displayName: 'Set NightlyBuildOption variable'
inputs:
scriptSource: inline
script: |
import os
name = "NightlyBuildOption"
value = "--nightly_build" if os.environ.get("NIGHTLY_BUILD") == "1" else ""
print("Setting variable: {} = '{}'".format(name, value))
print("##vso[task.setvariable variable={}]{}".format(name, value))