You've already forked element-android
mirror of
https://github.com/vector-im/element-android.git
synced 2025-08-07 14:42:55 +03:00
Add capability to download only one artifact
This commit is contained in:
@@ -41,6 +41,9 @@ parser.add_argument('-b',
|
|||||||
type=int,
|
type=int,
|
||||||
required=True,
|
required=True,
|
||||||
help='the buildkite build number.')
|
help='the buildkite build number.')
|
||||||
|
parser.add_argument('-f',
|
||||||
|
'--filename',
|
||||||
|
help='the filename, to download only one artifact.')
|
||||||
parser.add_argument('-e',
|
parser.add_argument('-e',
|
||||||
'--expecting',
|
'--expecting',
|
||||||
type=int,
|
type=int,
|
||||||
@@ -148,6 +151,8 @@ for elt in data:
|
|||||||
print(" %s: %s" % (key, str(value)))
|
print(" %s: %s" % (key, str(value)))
|
||||||
url = elt.get("download_url")
|
url = elt.get("download_url")
|
||||||
filename = elt.get("filename")
|
filename = elt.get("filename")
|
||||||
|
if args.filename is not None and args.filename != filename:
|
||||||
|
continue
|
||||||
target = targetDir + "/" + filename
|
target = targetDir + "/" + filename
|
||||||
print("Downloading %s to '%s'..." % (filename, targetDir))
|
print("Downloading %s to '%s'..." % (filename, targetDir))
|
||||||
if not args.simulate:
|
if not args.simulate:
|
||||||
|
Reference in New Issue
Block a user