Skip to content

Commit 8a418ba

Browse files
committed
Upload SHASUMS.txt when publishing release
1 parent c30d806 commit 8a418ba

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

script/upload-node-headers.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ def main():
4747
bucket, access_key, secret_key = s3_config()
4848
upload_node(bucket, access_key, secret_key, args.version)
4949

50-
# Upload the SHASUMS.txt.
51-
execute([sys.executable,
52-
os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'),
53-
'-v', args.version])
54-
5550

5651
def parse_args():
5752
parser = argparse.ArgumentParser(description='upload sumsha file')
@@ -110,8 +105,7 @@ def upload_node(bucket, access_key, secret_key, version):
110105
'atom-shell/dist/{0}'.format(version), glob.glob('node-*.tar.gz'))
111106

112107
if PLATFORM == 'win32':
113-
target_arch = get_target_arch()
114-
if target_arch == 'ia32':
108+
if get_target_arch() == 'ia32':
115109
node_lib = os.path.join(DIST_DIR, 'node.lib')
116110
else:
117111
node_lib = os.path.join(DIST_DIR, 'x64', 'node.lib')
@@ -125,7 +119,7 @@ def upload_node(bucket, access_key, secret_key, version):
125119
s3put(bucket, access_key, secret_key, DIST_DIR,
126120
'atom-shell/dist/{0}'.format(version), [node_lib])
127121

128-
# Upload the index.json
122+
# Upload the index.json.
129123
with scoped_cwd(SOURCE_ROOT):
130124
atom_shell = os.path.join(OUT_DIR, 'atom.exe')
131125
index_json = os.path.relpath(os.path.join(OUT_DIR, 'index.json'))

script/upload.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,22 @@ def main():
4646
sys.stderr.flush()
4747
return 1
4848

49-
# Upload atom-shell with GitHub Releases API.
5049
github = GitHub(auth_token())
5150
release_id = create_or_get_release_draft(github, args.version)
51+
52+
if args.publish_release:
53+
# Upload the SHASUMS.txt.
54+
execute([sys.executable,
55+
os.path.join(SOURCE_ROOT, 'script', 'upload-checksums.py'),
56+
'-v', ATOM_SHELL_VERSION])
57+
58+
# Press the publish button.
59+
publish_release(github, release_id)
60+
61+
# Do not upload other files when passed "-p".
62+
return
63+
64+
# Upload atom-shell with GitHub Releases API.
5265
upload_atom_shell(github, release_id, os.path.join(DIST_DIR, DIST_NAME))
5366
upload_atom_shell(github, release_id, os.path.join(DIST_DIR, SYMBOLS_NAME))
5467

@@ -67,10 +80,6 @@ def main():
6780
os.path.join(SOURCE_ROOT, 'script', 'upload-node-headers.py'),
6881
'-v', ATOM_SHELL_VERSION])
6982

70-
if args.publish_release:
71-
# Press the publish button.
72-
publish_release(github, release_id)
73-
7483

7584
def parse_args():
7685
parser = argparse.ArgumentParser(description='upload distribution file')

0 commit comments

Comments
 (0)