-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version updating infrastructure for 0.1.0
- Loading branch information
Showing
4 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package = "lua-lsp" | ||
version = "scm-1" | ||
version = "scm-0" | ||
source = { | ||
url = "git://github.com/Alloyed/lua-lsp" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package = "lua-lsp" | ||
version = "0.1.0-1" | ||
source = { | ||
url = "git://github.com/Alloyed/lua-lsp", | ||
tag = "v0.1.0", | ||
} | ||
description = { | ||
summary = "A Language Server implementation for lua, the language", | ||
detailed = [[ | ||
A Language Server for Lua code, written in Lua. | ||
It's still a work in progress, but it's usable for day-to-day. It currently | ||
supports: | ||
* Limited autocompletion | ||
* Goto definition | ||
* As you type linting and syntax checking | ||
* Code formatting | ||
* Supports Lua 5.1-5.3 and Luajit | ||
]], | ||
homepage = "https://github.com/Alloyed/lua-lsp", | ||
license = "MIT" | ||
} | ||
dependencies = { | ||
"lua >= 5.1, < 5.4", | ||
"dkjson ~> 2.5", | ||
"lpeglabel ~> 1.6", | ||
"inspect ~> 3.1" | ||
} | ||
build = { | ||
type = "builtin", | ||
modules = { | ||
["lua-lsp.analyze"] = "lua-lsp/analyze.lua", | ||
["lua-lsp.data.5_1"] = "lua-lsp/data/5_1.lua", | ||
["lua-lsp.data.5_2"] = "lua-lsp/data/5_2.lua", | ||
["lua-lsp.data.5_3"] = "lua-lsp/data/5_3.lua", | ||
["lua-lsp.data._test"] = "lua-lsp/data/_test.lua", | ||
["lua-lsp.data.love-completions"] = "lua-lsp/data/love-completions.lua", | ||
["lua-lsp.data.luajit-2_0"] = "lua-lsp/data/luajit-2_0.lua", | ||
["lua-lsp.formatting"] = "lua-lsp/formatting.lua", | ||
["lua-lsp.log"] = "lua-lsp/log.lua", | ||
["lua-lsp.loop"] = "lua-lsp/loop.lua", | ||
["lua-lsp.lua-parser.parser"] = "lua-lsp/lua-parser/parser.lua", | ||
["lua-lsp.lua-parser.scope"] = "lua-lsp/lua-parser/scope.lua", | ||
["lua-lsp.lua-parser.validator"] = "lua-lsp/lua-parser/validator.lua", | ||
["lua-lsp.methods"] = "lua-lsp/methods.lua", | ||
["lua-lsp.rpc"] = "lua-lsp/rpc.lua", | ||
["lua-lsp.unicode"] = "lua-lsp/unicode.lua" | ||
}, | ||
install = { | ||
bin = { | ||
"bin/lua-lsp" | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
_version="$1" | ||
|
||
if [ -z "$_version" ]; then | ||
echo "Version number required, format x.y.z" | ||
exit 1 | ||
fi | ||
|
||
tags=$(git tag -l "v$_version") | ||
if [ -n "${tags//}" ]; then | ||
echo "Tag v$_version exists" | ||
exit 1 | ||
fi | ||
|
||
read -r -d '' script <<EOT | ||
local a = "$1" | ||
if a:match('^%d+%.%d+%.%d+-%d+') then | ||
print(a) | ||
elseif a:match('^%d+%.%d+%.%d$') then | ||
print(a .."-1") | ||
else | ||
error('invalid argument') | ||
end | ||
EOT | ||
|
||
set -e | ||
_rspec_ver=$(lua -e "$script") | ||
git pull | ||
|
||
echo "::Updating to $_version, rockspec version $_rspec_ver" | ||
|
||
echo "::Performing tests" | ||
busted | ||
|
||
echo "::Generating rockspec" | ||
cd rockspecs | ||
luarocks new_version ../lua-lsp-scm-0.rockspec $_rspec_ver | ||
|
||
rspec=lua-lsp-${_rspec_ver}.rockspec | ||
echo "-- MOVE tag = \"v${_version}\"" >> $rspec | ||
$EDITOR $rspec | ||
luarocks lint $rspec | ||
cd .. | ||
|
||
echo "::Adding tag" | ||
git tag -a "v$_version" -m "Version $_version" | ||
|
||
echo <<END | ||
::Done. Upload with | ||
git push origin master --tags | ||
luarocks upload \"rockspecs/${rspec}\" | ||
::Undo with | ||
git reset --hard HEAD~1 && git tag -d "v$_version" | ||
END |