-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.lua
More file actions
39 lines (36 loc) · 834 Bytes
/
tasks.lua
File metadata and controls
39 lines (36 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
local spooder = require 'spooder'
spooder.task "test" {
depends = { "clean" };
description = "Runs tests";
[[
luacheck . || exit
busted --coverage --lpath '?.lua' || exit
luacov -r html based.lua
]]
}
spooder.task "documentation" {
description = "Builds and pushes the documentation";
depends = { "test"};
[[
hash=$(git log -1 --format=%h)
mkdir -p doc/coverage
cp -r luacov-html/* doc/coverage
ldoc .
cd doc
find . | treh -c
git add --all
if git log -1 --format=%s | grep "$hash$"
then git commit --amend --no-edit
else git commit -m "Update documentation to $hash"
fi
git push --force origin doc
cd ../
git stash pop || true
]]
}
spooder.task "clean" {
description = "Delete all build leftovers";
'rm -f luacov.stats.out';
'rm -f luacov.report.out';
'rm -f -r luacov-html';
}