diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index c80b709304a6..a279283cf09d 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -8,11 +8,10 @@ #define ATOM_MAJOR_VERSION 1 #define ATOM_MINOR_VERSION 8 #define ATOM_PATCH_VERSION 2 +#define ATOM_PRE_RELEASE_VERSION -beta.2 -#define ATOM_VERSION_IS_RELEASE 1 - -#ifndef ATOM_TAG -# define ATOM_TAG "" +#ifndef ATOM_PRE_RELEASE_VERSION +# define ATOM_PRE_RELEASE_VERSION "" #endif #ifndef ATOM_STRINGIFY @@ -20,17 +19,10 @@ #define ATOM_STRINGIFY_HELPER(n) #n #endif -#if ATOM_VERSION_IS_RELEASE # define ATOM_VERSION_STRING ATOM_STRINGIFY(ATOM_MAJOR_VERSION) "." \ ATOM_STRINGIFY(ATOM_MINOR_VERSION) "." \ ATOM_STRINGIFY(ATOM_PATCH_VERSION) \ - ATOM_TAG -#else -# define ATOM_VERSION_STRING ATOM_STRINGIFY(ATOM_MAJOR_VERSION) "." \ - ATOM_STRINGIFY(ATOM_MINOR_VERSION) "." \ - ATOM_STRINGIFY(ATOM_PATCH_VERSION) \ - ATOM_TAG "-pre" -#endif + ATOM_STRINGIFY(ATOM_PRE_RELEASE_VERSION) #define ATOM_VERSION "v" ATOM_VERSION_STRING diff --git a/script/bump-version.py b/script/bump-version.py index 42d6392baef4..28424aaa8ee6 100755 --- a/script/bump-version.py +++ b/script/bump-version.py @@ -85,7 +85,7 @@ def main(): with scoped_cwd(SOURCE_ROOT): update_electron_gyp(version, suffix) update_win_rc(version, versions) - update_version_h(versions) + update_version_h(versions, suffix) update_info_plist(version) update_package_json(version, suffix) tag_version(version, suffix) @@ -138,7 +138,7 @@ def update_win_rc(version, versions): f.write(''.join(lines)) -def update_version_h(versions): +def update_version_h(versions, suffix): version_h = os.path.join('atom', 'common', 'atom_version.h') with open(version_h, 'r') as f: lines = f.readlines() @@ -150,6 +150,11 @@ def update_version_h(versions): lines[i + 1] = '#define ATOM_MINOR_VERSION {0}\n'.format(versions[1]) lines[i + 2] = '#define ATOM_PATCH_VERSION {0}\n'.format(versions[2]) + if (suffix): + lines[i + 3] = '#define ATOM_PRE_RELEASE_VERSION {0}\n'.format(suffix) + else: + lines[i + 3] = '// #define ATOM_PRE_RELEASE_VERSION\n' + with open(version_h, 'w') as f: f.write(''.join(lines)) return diff --git a/spec/node-spec.js b/spec/node-spec.js index 1603b160ca69..210862e1bc60 100644 --- a/spec/node-spec.js +++ b/spec/node-spec.js @@ -336,7 +336,7 @@ describe('node feature', () => { }) it('includes the electron version in process.versions', () => { - assert(/^\d+\.\d+\.\d+$/.test(process.versions.electron)) + assert(/^\d+\.\d+\.\d+(\S*)?$/.test(process.versions.electron)) }) it('includes the chrome version in process.versions', () => {