mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add fallbacks
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
|
||||
#define ATOM_VERSION_IS_RELEASE 1
|
||||
|
||||
#ifndef ATOM_PRE_RELEASE_VERSION
|
||||
# define ATOM_PRE_RELEASE_VERSION ""
|
||||
#endif
|
||||
|
||||
#ifndef ATOM_TAG
|
||||
# define ATOM_TAG ""
|
||||
|
||||
@@ -149,7 +149,11 @@ def update_version_h(versions, suffix):
|
||||
lines[i] = '#define ATOM_MAJOR_VERSION {0}\n'.format(versions[0])
|
||||
lines[i + 1] = '#define ATOM_MINOR_VERSION {0}\n'.format(versions[1])
|
||||
lines[i + 2] = '#define ATOM_PATCH_VERSION {0}\n'.format(versions[2])
|
||||
lines[i + 3] = '#define ATOM_LABEL_VERSION {0}\n'.format(suffix)
|
||||
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user