-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.build.lua
35 lines (30 loc) · 941 Bytes
/
.build.lua
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
if not howlci then
howlci = {
log = print,
status = print,
close = function() end
}
end
if _HOST then howlci.log("info", "Host: " .. _HOST) end
if _CC_VERSION then howlci.log("info", "CC Version" .. _CC_VERSION) end
if _MC_VERSION then howlci.log("info", "MC Version" .. _MC_VERSION) end
if _LUAJ_VERSION then howlci.log("info", "LuaJ Version " .. _LUAJ_VERSION) end
local func, msg = loadfile(shell.resolve("howl.lua"), _ENV)
if not func then
howlci.status("fail", "Cannot load Howl: " .. (msg or "<no msg>"))
return
end
local ok, msg = pcall(func, "-v", "build")
if not ok then
howlci.status("fail", "Failed running task: " .. (msg or "<no msg>"))
else
howlci.status("ok", "Everything built correctly!")
end
local ok, msg = pcall(func, "-v", "test")
if not ok then
howlci.status("fail", "Failed running task: " .. (msg or "<no msg>"))
else
howlci.status("ok", "Tests ran correctly!")
end
sleep(2)
howlci.close()