Make sure binary version is dumped before uploading.
This commit is contained in:
parent
0483871388
commit
06ae5c06b8
2 changed files with 19 additions and 1 deletions
|
@ -26,7 +26,7 @@ if (argv._.length > 0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (argv.version) {
|
} else if (argv.version) {
|
||||||
console.log(process.versions['atom-shell']);
|
console.log('v' + process.versions['atom-shell']);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
} else {
|
} else {
|
||||||
require('./default_app.js');
|
require('./default_app.js');
|
||||||
|
|
|
@ -36,6 +36,14 @@ def main():
|
||||||
create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py')
|
create_dist = os.path.join(SOURCE_ROOT, 'script', 'create-dist.py')
|
||||||
subprocess.check_output([sys.executable, create_dist])
|
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.
|
# Upload atom-shell with GitHub Releases API.
|
||||||
github = GitHub(auth_token())
|
github = GitHub(auth_token())
|
||||||
release_id = create_or_get_release_draft(github, args.version)
|
release_id = create_or_get_release_draft(github, args.version)
|
||||||
|
@ -58,6 +66,16 @@ def parse_args():
|
||||||
return parser.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():
|
def dist_newer_than_head():
|
||||||
with scoped_cwd(SOURCE_ROOT):
|
with scoped_cwd(SOURCE_ROOT):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue