From c42347ee2d77c14b375a02dca99427189b606187 Mon Sep 17 00:00:00 2001 From: Thomas Harning Jr Date: Wed, 26 Feb 2014 20:52:30 -0500 Subject: [PATCH] base: updates rock creation tool to include tag version --- util/createRock.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/createRock.lua b/util/createRock.lua index d4481c9..63f0e8b 100644 --- a/util/createRock.lua +++ b/util/createRock.lua @@ -6,7 +6,8 @@ local template = [=[ package = "luajson" version = %VERSION% source = { - url = "git://github.com/harningt/luajson.git" + url = "git://github.com/harningt/luajson.git", + tag = %TAG_VERSION% } description = { summary = "customizable JSON decoder/encoder", @@ -20,7 +21,6 @@ description = { } dependencies = { "lua >= 5.1", - "lunit >= 0.4", "lpeg >= 0.8.1" } build = { @@ -38,8 +38,10 @@ in_modules:close() modules = modules:gsub("lua/([^\n]*)%.lua", function(module) return "\t\t[" .. ("%q"):format(module:gsub("/",".")) .. "] = " .. ("%q"):format("lua/" .. module .. ".lua") .. "," end) +tag_version = version:match("^(.*)[-]") local out = template:gsub("%%(.-)%%", { VERSION = ("%q"):format(version), + TAG_VERSION = ("%q"):format(tag_version), MODULES = modules }) print(out) -- 2.11.4.GIT