diff --git a/browser/default_app/main.js b/browser/default_app/main.js index 1db036e07a4b..3bfb5b510221 100644 --- a/browser/default_app/main.js +++ b/browser/default_app/main.js @@ -26,7 +26,7 @@ if (argv._.length > 0) { } } } else if (argv.version) { - console.log(process.versions['atom-shell']); + console.log('v' + process.versions['atom-shell']); process.exit(0); } else { require('./default_app.js'); diff --git a/script/upload.py b/script/upload.py index 637feae82368..1e8168e9f2a2 100755 --- a/script/upload.py +++ b/script/upload.py @@ -36,6 +36,14 @@ def main(): create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py') subprocess.check_output([sys.executable, create_dist]) + build_version = get_atom_shell_build_version() + if not ATOM_SHELL_VRESION.startswith(build_version): + error = 'Tag name ({0}) should match build version ({1})\n'.format( + ATOM_SHELL_VRESION, build_version) + sys.stderr.write(error) + sys.stderr.flush() + return 1 + # Upload atom-shell with GitHub Releases API. github = GitHub(auth_token()) release_id = create_or_get_release_draft(github, args.version) @@ -58,6 +66,16 @@ def parse_args(): return parser.parse_args() +def get_atom_shell_build_version(): + if sys.platform == 'darwin': + atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'Atom.app', + 'Contents', 'MacOS', 'Atom') + else: + atom_shell = os.path.join(SOURCE_ROOT, 'out', 'Debug', 'atom.exe') + + return subprocess.check_output([atom_shell, '--version']).strip() + + def dist_newer_than_head(): with scoped_cwd(SOURCE_ROOT): try: