From 2b594b9c81fea02598e0f6b6dff7972677f2c150 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 6 Dec 2020 15:22:20 -0500 Subject: Use vX.Y.Z-dev+{git-describe} for development versions --- scripts/update_version_stamp.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/update_version_stamp.lua b/scripts/update_version_stamp.lua index 11b521fab6..0342e08f31 100755 --- a/scripts/update_version_stamp.lua +++ b/scripts/update_version_stamp.lua @@ -35,11 +35,10 @@ if not described then end -- `git describe` annotates the most recent tagged release; for pre-release --- builds we must replace that with the unreleased version. -local with_prefix = described:gsub("^v%d+%.%d+%.%d+", prefix) -if described == with_prefix then - -- Prepend the prefix always, e.g. with "nightly-12208-g4041b62b9". - with_prefix = prefix .. "-" .. described +-- builds we append that to the dev version +local with_prefix = prefix +if prefix:match('-dev$') ~= nil then + with_prefix = prefix .. '+' .. described:gsub('^v%d+%.%d+%.%d+-', '') end -- Read existing include file. -- cgit