From 3ecad1d542fd44a3638d8d8397eeb59f7252b1d7 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sun, 11 Jan 2015 17:29:36 +1100 Subject: [PATCH] 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 --- src/node_version.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/node_version.h b/src/node_version.h index 15cdfa8df1..1eec075ec2 100644 --- a/src/node_version.h +++ b/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