From 1fdeda5c95da936a46272a51d8fa02dca9520997 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Wed, 3 Apr 2019 01:19:42 +1100 Subject: [PATCH] build-pkg: add version id to allow adding git tag --- tools/build-pkg.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index 33828685..cc0e46b0 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -29,6 +29,9 @@ MXE_BUILD_PKG_CODENAME. This sets the output directory and name mangling for the pool directory in the apt repo. Could be used to create lowest-common-glibc based versions. +Set MXE_BUILD_PKG_VERSION_ID to add a git tag to each pkg version +string - defaults to YYYYMMDD build datestamp. + To switch off the second pass, set MXE_BUILD_PKG_NO_SECOND_PASS to 1. See https://github.com/mxe/mxe/issues/1111 @@ -83,7 +86,7 @@ local no_fakeroot = os.getenv('MXE_BUILD_PKG_NO_FAKEROOT') local no_second_pass = os.getenv('MXE_BUILD_PKG_NO_SECOND_PASS') local build_targets = os.getenv('MXE_BUILD_PKG_TARGETS') -local TODAY = os.date("%Y%m%d") +local VERSION_ID = os.getenv('MXE_BUILD_PKG_VERSION_ID') or os.date("%Y%m%d") local MAX_TRIES = 10 @@ -801,7 +804,7 @@ local function debianControl(options) '\n' .. 'Recommends: ' .. table.concat(options.recommends, ', ') end - local version = options.version .. '-' .. TODAY + local version = options.version .. '-' .. VERSION_ID return CONTROL:format( options.package, version,