Add fallbacks

This commit is contained in:
Felix Rieseberg 2017-11-13 09:27:02 -08:00
parent b382dec4a2
commit 163a33a9db
2 changed files with 8 additions and 1 deletions

View file

@ -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 ""

View file

@ -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))