diff options
-rwxr-xr-x | makedist | 22 | ||||
-rw-r--r-- | src/luarocks/core/cfg.lua | 4 |
2 files changed, 8 insertions, 18 deletions
@@ -17,9 +17,13 @@ make clean || exit 1 | |||
17 | version=$1 | 17 | version=$1 |
18 | shift | 18 | shift |
19 | 19 | ||
20 | #------------------------------------------------------------------------------- | ||
20 | if ! [ "$version" = "dev" ] | 21 | if ! [ "$version" = "dev" ] |
21 | then | 22 | then |
22 | 23 | ||
24 | # e.g. if $version is "2.3.0", $xyversion is "2.3" | ||
25 | xyversion=${version%.*} | ||
26 | |||
23 | ROCKSPEC="luarocks-$version-1.rockspec" | 27 | ROCKSPEC="luarocks-$version-1.rockspec" |
24 | 28 | ||
25 | if [ "$1" = "branch" ] | 29 | if [ "$1" = "branch" ] |
@@ -47,9 +51,7 @@ then | |||
47 | sed -i 's/program_version = "[^"]*"/program_version = "'$version'"/' src/luarocks/core/cfg.lua | 51 | sed -i 's/program_version = "[^"]*"/program_version = "'$version'"/' src/luarocks/core/cfg.lua |
48 | sed -i 's/version: [0-9.]*/version: '$version'./' appveyor.yml | 52 | sed -i 's/version: [0-9.]*/version: '$version'./' appveyor.yml |
49 | sed -i 's/LUAROCKS_VER: [0-9.]*/LUAROCKS_VER: '$version'/' appveyor.yml | 53 | sed -i 's/LUAROCKS_VER: [0-9.]*/LUAROCKS_VER: '$version'/' appveyor.yml |
50 | program_series=${version%.*} | 54 | sed -i 's/vars.VERSION = "[0-9.]*"/vars.VERSION = "'$xyversion'"/' install.bat |
51 | sed -i 's/program_series = "[0-9.]*"/program_series = "'$program_series'"/' src/luarocks/core/cfg.lua | ||
52 | sed -i 's/vars.VERSION = "[0-9.]*"/vars.VERSION = "'$program_series'"/' install.bat | ||
53 | echo "===============================================================================" | 55 | echo "===============================================================================" |
54 | git diff | 56 | git diff |
55 | echo "===============================================================================" | 57 | echo "===============================================================================" |
@@ -98,22 +100,14 @@ grep -q "LUAROCKS_VER: $version" appveyor.yml || { | |||
98 | exit 1 | 100 | exit 1 |
99 | } | 101 | } |
100 | 102 | ||
101 | # e.g. if $version is "2.3.0", $program_series is "2.3" | 103 | grep -q "vars.VERSION = \"$xyversion\"" install.bat || { |
102 | program_series=${version%.*} | ||
103 | |||
104 | grep -q "program_series = \"$program_series\"" src/luarocks/core/cfg.lua || { | ||
105 | echo | ||
106 | echo "program_series in src/luarocks/core/cfg.lua is incorrect. Please fix it." | ||
107 | exit 1 | ||
108 | } | ||
109 | |||
110 | grep -q "vars.VERSION = \"$program_series\"" install.bat || { | ||
111 | echo | 104 | echo |
112 | echo "vars.VERSION in install.bat is incorrect. Please fix it." | 105 | echo "vars.VERSION in install.bat is incorrect. Please fix it." |
113 | exit 1 | 106 | exit 1 |
114 | } | 107 | } |
115 | 108 | ||
116 | fi | 109 | fi # if ! [ "$version" = "dev" ] |
110 | #------------------------------------------------------------------------------- | ||
117 | 111 | ||
118 | out="luarocks-$version" | 112 | out="luarocks-$version" |
119 | rm -rf "$out" | 113 | rm -rf "$out" |
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua index 79ae0417..5b406121 100644 --- a/src/luarocks/core/cfg.lua +++ b/src/luarocks/core/cfg.lua | |||
@@ -21,8 +21,6 @@ local vers = require("luarocks.core.vers") | |||
21 | -------------------------------------------------------------------------------- | 21 | -------------------------------------------------------------------------------- |
22 | 22 | ||
23 | local program_version = "dev" | 23 | local program_version = "dev" |
24 | local program_series = "3.0" | ||
25 | local major_version = (program_version:match("([^.]%.[^.])")) or program_series | ||
26 | 24 | ||
27 | local is_windows = package.config:sub(1,1) == "\\" | 25 | local is_windows = package.config:sub(1,1) == "\\" |
28 | 26 | ||
@@ -604,8 +602,6 @@ function cfg.init(detected, warning) | |||
604 | end | 602 | end |
605 | 603 | ||
606 | cfg.program_version = program_version | 604 | cfg.program_version = program_version |
607 | cfg.program_series = program_series | ||
608 | cfg.major_version = major_version | ||
609 | 605 | ||
610 | if hardcoded.IS_BINARY then | 606 | if hardcoded.IS_BINARY then |
611 | cfg.is_binary = true | 607 | cfg.is_binary = true |