aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2019-06-06 16:44:44 -0300
committerHisham Muhammad <hisham@gobolinux.org>2019-06-06 16:45:04 -0300
commit59e026985872feb54aaea6c8c8800b7181c82dcc (patch)
tree3eb7fa22449d08408629b4a6da37af49037a05b0
parent01a3a26ca169de04673bc73c5205eb9d43d66805 (diff)
downloadluarocks-59e026985872feb54aaea6c8c8800b7181c82dcc.tar.gz
luarocks-59e026985872feb54aaea6c8c8800b7181c82dcc.tar.bz2
luarocks-59e026985872feb54aaea6c8c8800b7181c82dcc.zip
makedist: add branch command
-rwxr-xr-xmakedist42
1 files changed, 42 insertions, 0 deletions
diff --git a/makedist b/makedist
index 9675f7cd..57c92695 100755
--- a/makedist
+++ b/makedist
@@ -19,6 +19,48 @@ then
19 19
20ROCKSPEC="luarocks-$1-1.rockspec" 20ROCKSPEC="luarocks-$1-1.rockspec"
21 21
22if [ "$1" = "branch" ]
23then
24 shift
25 version=$1
26
27 if git show $version &> /dev/null
28 then
29 echo "Branch $version already exists."
30 exit 1
31 fi
32
33 git reset
34 git checkout .
35 git checkout -B $version
36 ROCKSPEC="luarocks-$1-1.rockspec"
37 currentrockspec=$(ls luarocks-*.rockspec)
38 if [ "$currentrockspec" != "$ROCKSPEC" ] && ! [ -e "$ROCKSPEC" ]
39 then
40 git mv luarocks-*.rockspec "$ROCKSPEC"
41 fi
42 sed -i 's/"Configuring LuaRocks version .*"/"Configuring LuaRocks version '$version'..."/' configure
43 sed -i 's/version = "[^"]*"/version = "'$version'-1"/' $ROCKSPEC
44 sed -i 's/\( url = "[^"]*",\)/\1\n tag = "v'$version'"/' $ROCKSPEC
45 sed -i 's/program_version = "[^"]*"/program_version = "'$version'"/' src/luarocks/core/cfg.lua
46 sed -i 's/version: [0-9.]*/version: '$version'./' appveyor.yml
47 sed -i 's/LUAROCKS_VER: [0-9.]*/LUAROCKS_VER: '$version'/' appveyor.yml
48 program_series=${version%.*}
49 sed -i 's/program_series = "[0-9.]*"/program_series = "'$program_series'"/' src/luarocks/core/cfg.lua
50 sed -i 's/vars.VERSION = "[0-9.]*"/vars.VERSION = "'$program_series'"/' install.bat
51 echo "==============================================================================="
52 git diff
53 echo "==============================================================================="
54 echo "Does the change look alright? Press 'y' to commit"
55 echo "==============================================================================="
56 read
57 if [ "$REPLY" = "y" ]
58 then
59 git commit -av -m "Release $version"
60 fi
61fi
62
63
22[ -e "$ROCKSPEC" ] || { 64[ -e "$ROCKSPEC" ] || {
23 echo 65 echo
24 echo "$ROCKSPEC is missing. Please check rockspec version is correct." 66 echo "$ROCKSPEC is missing. Please check rockspec version is correct."