diff --git a/docs/src/conf.py b/docs/src/conf.py index 1309ba1a..9ec9ec2c 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -29,7 +29,9 @@ def get_libuv_version(): patch = int(m.group(1)) m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE) is_release = int(m.group(1)) - return '%d.%d.%d%s' % (major, minor, patch, '-pre' if not is_release else '') + m = re.search(r"""^#define UV_VERSION_SUFFIX \"(\w*)\"$""", data, re.MULTILINE) + suffix = m.group(1) + return '%d.%d.%d%s' % (major, minor, patch, '-%s' % suffix if not is_release else '') except Exception: return 'unknown' diff --git a/include/uv-version.h b/include/uv-version.h index 7f686d68..23770c74 100644 --- a/include/uv-version.h +++ b/include/uv-version.h @@ -34,5 +34,6 @@ #define UV_VERSION_MINOR 0 #define UV_VERSION_PATCH 0 #define UV_VERSION_IS_RELEASE 0 +#define UV_VERSION_SUFFIX "dev" #endif /* UV_VERSION_H */ diff --git a/src/version.c b/src/version.c index 02de6de3..ff91a460 100644 --- a/src/version.c +++ b/src/version.c @@ -35,7 +35,7 @@ #if UV_VERSION_IS_RELEASE # define UV_VERSION_STRING UV_VERSION_STRING_BASE #else -# define UV_VERSION_STRING UV_VERSION_STRING_BASE "-pre" +# define UV_VERSION_STRING UV_VERSION_STRING_BASE "-" UV_VERSION_SUFFIX #endif