-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
103 lines (91 loc) · 2.36 KB
/
Taskfile.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# https://taskfile.dev
version: "3"
vars:
erlangVersion: "26.2"
tasks:
sh: export ERL_AFLAGS="+pc unicode -kernel shell_history enabled" && erl
version: erl +V # erl -version
# man: erl -man fmt
## Learning
mk-learning: rebar3 new lib learning
test-learning:
dir: learning
cmds:
- rebar3 eunit
## Local lab ubuntu vm
## try Cowboy with rebar3
mk-rebar3web: rebar3 new release rebar3web desc="Try cowboy with rebar3"
## boyweb: try Cowboy using erlang.mk as https://ninenines.eu/docs/en/cowboy/2.12/guide/getting_started/
boy-open: open http://localhost:8080
boy-run:
dir: boyweb
cmds:
- make run
## escript command
sh-rebar3escript:
dir: rebar3escript
cmds:
- rebar3 shell
run-rebar3escript:
dir: rebar3escript
deps:
- build-rebar3escript
cmds:
- _build/default/bin/rebar3escript hello escript
build-rebar3escript:
dir: rebar3escript
deps:
- mk-rebar3escript
cmds:
- rebar3 compile
- rebar3 escriptize
mk-rebar3escript: rebar3 new escript rebar3escript desc="Checking out OTP escripts"
## try otp-app with release
run-rebar3rel:
dir: rebar3rel
deps:
- rel-rebar3rel
cmds:
- _build/default/rel/rebar3rel/bin/rebar3rel foreground
# - rebar3 shell
rel-rebar3rel:
dir: rebar3rel
deps:
- mk-rebar3rel
cmds:
- rebar3 release
# - _build/default/rel/rebar3rel/bin/rebar3rel foreground
# - rebar3 as prod release
# - rebar3 as prod tar
build-rebar3rel:
dir: rebar3rel
deps:
- mk-rebar3rel
cmds:
- rebar3 compile
mk-rebar3rel: rebar3 new release rebar3rel desc="Checking out OTP releases"
## otp app or lib
mk-rebar3app:
cmds:
- |
rebar3 new app rebar3app desc="Checking out OTP app"
cd rebar3app
rebar3 compile
mk-rebar3lib:
cmds:
- |
rebar3 new lib rebar3lib desc="Checking out OTP libs"
cd rebar3lib
rebar3 compile
# erlang build tool
# rebar3 new help <tmpl>
install-rebar3: brew install rebar3
# todo dependency
# https://github.com/asdf-vm/asdf-erlang?tab=readme-ov-file#osx
# brew install libxslt fop
install-asdf-erlang:
desc: "install erlang by asdf"
cmds:
- asdf plugin erlang || true
- asdf install erlang {{.erlangVersion}}
# install-kerl: brew install kerl