Browse Source

src: only append "-pre" to version if no tag

removed because nightly builds use the TAG make variable
to create a prerelease tag after the version yet `-pre` is
also appended beyond that. `-pre` is unnecessary if another
prerelease tag is being used.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v1.8.0-commit
Rod Vagg 10 years ago
parent
commit
3ecad1d542
  1. 12
      src/node_version.h

12
src/node_version.h

@ -28,25 +28,27 @@
#define NODE_VERSION_IS_RELEASE 0
#ifndef NODE_TAG
# define NODE_TAG ""
#endif
#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
#define NODE_STRINGIFY_HELPER(n) #n
#endif
#if NODE_VERSION_IS_RELEASE
# ifndef NODE_TAG
# define NODE_TAG ""
# endif
# define NODE_VERSION_STRING NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \
NODE_STRINGIFY(NODE_MINOR_VERSION) "." \
NODE_STRINGIFY(NODE_PATCH_VERSION) \
NODE_TAG
#else
# ifndef NODE_TAG
# define NODE_TAG "-pre"
# endif
# define NODE_VERSION_STRING NODE_STRINGIFY(NODE_MAJOR_VERSION) "." \
NODE_STRINGIFY(NODE_MINOR_VERSION) "." \
NODE_STRINGIFY(NODE_PATCH_VERSION) \
NODE_TAG "-pre"
NODE_TAG
#endif
#define NODE_VERSION "v" NODE_VERSION_STRING

Loading…
Cancel
Save