From: Cheng Zhao Date: Mon, 12 Aug 2013 07:01:05 +0000 (+0800) Subject: Upload to S3 with readable version. X-Git-Tag: v0.3.1~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a27009f0a970d960fff58f2878be033fc139bc6c;p=electron.git Upload to S3 with readable version. --- 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)