Skip to content

Commit 08baa8f

Browse files
committed
upload_appveyor_builds.py can take build no
1 parent 7d4bdb5 commit 08baa8f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

upload_appveyor_builds.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,16 @@ def main():
104104
help='Overwrite files if already exist')
105105
parser.add_argument('--dist-dir', default='./dist/',
106106
help='The temporary directory to download artifacts')
107-
parser.add_argument('tag', help='Git tag of the version to upload')
107+
parser.add_argument(
108+
'tag',
109+
help=('Git tag of the version to upload. If it has a leading slash, '
110+
'it means AppVeyor build number rather than Git tag.')
111+
)
108112
args = parser.parse_args()
109-
build = ci_tag_build(args.tag)
113+
if args.tag.startswith('/'):
114+
build = {'version': args.tag.lstrip('/')}
115+
else:
116+
build = ci_tag_build(args.tag)
110117
jobs = ci_jobs(build)
111118
if not os.path.isdir(args.dist_dir):
112119
print(args.dist_dir, 'does not exist yet; creating a new directory...')

0 commit comments

Comments
 (0)