From a27009f0a970d960fff58f2878be033fc139bc6c Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 12 Aug 2013 15:01:05 +0800 Subject: [PATCH] Upload to S3 with readable version. --- script/lib/util.py | 4 ++++ script/upload.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/script/lib/util.py b/script/lib/util.py index 88f6b7c1..5d4b8ba8 100644 --- a/script/lib/util.py +++ b/script/lib/util.py @@ -87,3 +87,7 @@ def safe_mkdir(path): except OSError as e: if e.errno != errno.EEXIST: raise + + +def get_atom_shell_version(): + return subprocess.check_output(['git', 'describe', '--tags']).strip() diff --git a/script/upload.py b/script/upload.py index df698932..7d99ad69 100755 --- a/script/upload.py +++ b/script/upload.py @@ -51,10 +51,10 @@ def dist_newer_than_head(): def upload(): os.chdir(SOURCE_ROOT) bucket, access_key, secret_key = s3_config() - commit = subprocess.check_output(['git', 'describe', '--tags']).strip() + version = get_atom_shell_version() s3put(bucket, access_key, secret_key, SOURCE_ROOT, - 'atom-shell/{0}'.format(commit), glob.glob('atom-shell*.zip')) + 'atom-shell/{0}'.format(version), glob.glob('atom-shell*.zip')) update_version(bucket, access_key, secret_key) -- 2.43.0