summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2019-04-02 14:19:42 (GMT)
committerTony Theodore <tonyt@logyst.com>2019-04-02 14:19:42 (GMT)
commit1fdeda5c95da936a46272a51d8fa02dca9520997 (patch)
tree19baf1f66fb060f2b42c2d7c892768a1397aa00f /tools
parentff7c9adc265fe2ad12df95342b357a2b91277888 (diff)
downloadmxe-1fdeda5c95da936a46272a51d8fa02dca9520997.zip
mxe-1fdeda5c95da936a46272a51d8fa02dca9520997.tar.gz
mxe-1fdeda5c95da936a46272a51d8fa02dca9520997.tar.bz2
build-pkg: add version id to allow adding git tag
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build-pkg.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua
index 3382868..cc0e46b 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,