build: change upload-to-s3 vars to upload-to-storage (#34105)
* build: change upload-to-s3 vars to upload-to-az * build: change upload-to-az to upload-to-storage
This commit is contained in:
parent
dd7dfd7ecd
commit
6fea35271c
5 changed files with 28 additions and 29 deletions
|
@ -47,7 +47,7 @@ def main():
|
|||
args = parse_args()
|
||||
if args.verbose:
|
||||
enable_verbose_mode()
|
||||
if args.upload_to_s3:
|
||||
if args.upload_to_storage:
|
||||
utcnow = datetime.datetime.utcnow()
|
||||
args.upload_timestamp = utcnow.strftime('%Y%m%d')
|
||||
|
||||
|
@ -64,7 +64,7 @@ def main():
|
|||
if not release['draft']:
|
||||
tag_exists = True
|
||||
|
||||
if not args.upload_to_s3:
|
||||
if not args.upload_to_storage:
|
||||
assert release['exists'], \
|
||||
'Release does not exist; cannot upload to GitHub!'
|
||||
assert tag_exists == args.overwrite, \
|
||||
|
@ -148,7 +148,7 @@ def main():
|
|||
OUT_DIR, 'hunspell_dictionaries.zip')
|
||||
upload_electron(release, hunspell_dictionaries_zip, args)
|
||||
|
||||
if not tag_exists and not args.upload_to_s3:
|
||||
if not tag_exists and not args.upload_to_storage:
|
||||
# Upload symbols to symbol server.
|
||||
run_python_upload_script('upload-symbols.py')
|
||||
if PLATFORM == 'win32':
|
||||
|
@ -174,9 +174,9 @@ def parse_args():
|
|||
parser.add_argument('-p', '--publish-release',
|
||||
help='Publish the release',
|
||||
action='store_true')
|
||||
parser.add_argument('-s', '--upload_to_s3',
|
||||
help='Upload assets to s3 bucket',
|
||||
dest='upload_to_s3',
|
||||
parser.add_argument('-s', '--upload_to_storage',
|
||||
help='Upload assets to azure bucket',
|
||||
dest='upload_to_storage',
|
||||
action='store_true',
|
||||
default=False,
|
||||
required=False)
|
||||
|
@ -342,9 +342,9 @@ def upload_electron(release, file_path, args):
|
|||
except NonZipFileError:
|
||||
pass
|
||||
|
||||
# if upload_to_s3 is set, skip github upload.
|
||||
# todo (vertedinde): migrate this variable to upload_to_az
|
||||
if args.upload_to_s3:
|
||||
# if upload_to_storage is set, skip github upload.
|
||||
# todo (vertedinde): migrate this variable to upload_to_storage
|
||||
if args.upload_to_storage:
|
||||
key_prefix = 'release-builds/{0}_{1}'.format(args.version,
|
||||
args.upload_timestamp)
|
||||
store_artifact(os.path.dirname(file_path), key_prefix, [file_path])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue