Update task file to latest spooder features
This commit is contained in:
parent
bf53b1f333
commit
f3dab5753e
1 changed files with 24 additions and 30 deletions
26
tasks.lua
26
tasks.lua
|
@ -1,22 +1,17 @@
|
||||||
local spooder = require 'spooder'
|
local task = require 'spooder' .task
|
||||||
|
|
||||||
spooder.task "test" {
|
task.test {
|
||||||
description = "Runs tests";
|
description = "Runs tests";
|
||||||
function(helper)
|
'rm luacov.stats.out || true';
|
||||||
helper.run([[
|
'luacheck . *.rockspec';
|
||||||
rm luacov.stats.out
|
'busted --coverage --lpath "?.lua"';
|
||||||
luacheck . || exit
|
'luacov -r html glass.lua';
|
||||||
busted --coverage --lpath '?.lua' || exit
|
|
||||||
luacov -r html glass.lua
|
|
||||||
]])
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spooder.task "documentation" {
|
task.documentation {
|
||||||
description = "Builds and pushes the documentation";
|
description = "Builds and pushes the documentation";
|
||||||
depends = { "test"};
|
depends = "test";
|
||||||
function(helper)
|
[[
|
||||||
helper.run([[
|
|
||||||
hash=$(git log -1 --format=%h)
|
hash=$(git log -1 --format=%h)
|
||||||
mkdir -p doc/coverage
|
mkdir -p doc/coverage
|
||||||
cp -r luacov-html/* doc/coverage
|
cp -r luacov-html/* doc/coverage
|
||||||
|
@ -31,6 +26,5 @@ spooder.task "documentation" {
|
||||||
git push --force origin doc
|
git push --force origin doc
|
||||||
cd ../
|
cd ../
|
||||||
git stash pop || true
|
git stash pop || true
|
||||||
]])
|
]];
|
||||||
end;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue