Skip to content

Commit

Permalink
Allow to override main download.py argument defaults with environment…
Browse files Browse the repository at this point in the history
… variables
  • Loading branch information
glandium committed Dec 24, 2023
1 parent 3b763ba commit a41730c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,14 @@ def main(args):
help='only print the download url')
pgroup = parser.add_mutually_exclusive_group()
pgroup.add_argument('--branch', metavar='BRANCH',
default=os.environ.get("GIT_CINNABAR_DOWNLOAD_BRANCH"),
help='download a build for the given branch')
pgroup.add_argument('--exact', metavar='EXACT',
default=os.environ.get("GIT_CINNABAR_DOWNLOAD_EXACT"),
help='download a build for the given commit')
parser.add_argument('--variant', metavar='VARIANT',
default=os.environ.get(
"GIT_CINNABAR_DOWNLOAD_VARIANT"),
help='download the given variant')
parser.add_argument('--system', default=platform.system(),
help=argparse.SUPPRESS)
Expand Down

0 comments on commit a41730c

Please sign in to comment.