aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-04-12 14:09:12 -0300
committerHisham Muhammad <hisham@gobolinux.org>2013-04-12 14:09:12 -0300
commit4bc14e55b36ec47231b446c0fa7afc3c39173af1 (patch)
treebb32725038e97ca0e181aa541f0d55e0c14ea03d
parent8ac90978cb0825beb4ad16f096bbfa44c0bd3d86 (diff)
downloadluarocks-4bc14e55b36ec47231b446c0fa7afc3c39173af1.tar.gz
luarocks-4bc14e55b36ec47231b446c0fa7afc3c39173af1.tar.bz2
luarocks-4bc14e55b36ec47231b446c0fa7afc3c39173af1.zip
Make new_version consume hyphens from version numbers
-rw-r--r--src/luarocks/new_version.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/new_version.lua b/src/luarocks/new_version.lua
index 4eebf26a..e1e3f80f 100644
--- a/src/luarocks/new_version.lua
+++ b/src/luarocks/new_version.lua
@@ -100,11 +100,11 @@ function run(...)
100 new_ver = old_ver 100 new_ver = old_ver
101 new_rev = tonumber(old_rev) + 1 101 new_rev = tonumber(old_rev) + 1
102 end 102 end
103 103 local new_rockver = new_ver:gsub("-", "")
104 104
105 local out_rs = persist.load_into_table(filename) 105 local out_rs = persist.load_into_table(filename)
106 local out_name = out_rs.package:lower() 106 local out_name = out_rs.package:lower()
107 out_rs.version = new_ver.."-"..new_rev 107 out_rs.version = new_rockver.."-"..new_rev
108 if url then 108 if url then
109 out_rs.source.url = url 109 out_rs.source.url = url
110 check_url_and_update_md5(out_rs, out_name) 110 check_url_and_update_md5(out_rs, out_name)
@@ -126,7 +126,7 @@ function run(...)
126 out_rs.build.type = "builtin" 126 out_rs.build.type = "builtin"
127 end 127 end
128 128
129 local out_filename = out_name.."-"..new_ver.."-"..new_rev..".rockspec" 129 local out_filename = out_name.."-"..new_rockver.."-"..new_rev..".rockspec"
130 130
131 persist.save_from_table(out_filename, out_rs, order) 131 persist.save_from_table(out_filename, out_rs, order)
132 132