-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtasks.lua
More file actions
55 lines (51 loc) · 1.14 KB
/
tasks.lua
File metadata and controls
55 lines (51 loc) · 1.14 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
local utils = require('task_runner.helpers')
local function task1()
print('task 1 executed!')
end
local function task2_1()
print('task2.task1 executed!')
end
local function task2_2()
print('task2.task2 executed!')
end
return {
deploy = 'luarocks --lua-version=' .. _VERSION:match('%d+%.%d+') .. ' make --local',
format = 'stylua .',
['local'] = task1,
fn_with_args = function(arg1, arg2)
print(arg1, arg2)
end,
task2 = {
_setup = function()
print('Setup for task2')
end,
task1 = {
_desc = 'Run task2.taks1',
_action = task2_1,
},
task2 = task2_2,
test = function()
print(require('inspect')(require('lunajson').decode('{"Hello":["lunajson",1.5]}')))
end,
_desc = 'Run task2 related tasks',
test1 = function()
utils.shell('sleep 2')
end,
},
task3 = {
_setup = function()
utils.shell('echo setup run')
end,
_action = 'echo Hello',
},
task4 = {
_setup = 'echo setup',
_action = 'echo Hello',
},
task5 = {
_action = function(prog_args)
print(table.concat(prog_args, '|'))
end,
_desc = 'Just a regular task5',
},
}