-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathokfile.py
74 lines (52 loc) · 1.53 KB
/
okfile.py
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
project = 'jarvis'
########################################
# Install Tasks
########################################
def install_phoenix():
'''Install Phoenix web framework'''
URL = 'https://github.com/phoenixframework/phoenix/releases/download/v{0}/phoenix_new-{0}.ez'
VERSION = '0.12.0'
ok.mix('archive.install {}'.format(URL.format(VERSION)))
def install_orpheus():
'''Install Orpheus, the jarvis kernel'''
with ok.root('orpheus'):
ok.mix('do deps.get, compile')
def install_client():
'''Install the reference client'''
with ok.root('client'):
ok.npm('install').bower('install')
def post_install():
'''Run all post-installation tasks'''
pass
########################################
# Run Tasks
########################################
def orpheus():
'''Start Orpheus, the jarvis kernel'''
with ok.root('orpheus'):
ok.mix('phoenix.server')
########################################
# Build Tasks
########################################
def build_client():
with ok.root('client'):
ok.node('gulp', module=True)
########################################
# Test Tasks
########################################
def test_orpheus():
with ok.root('orpheus'):
ok.mix('test')
def test_modules():
ok.run('elixir `find modules -name "*.exs"`')
def test():
ok.run([test_orpheus, test_modules])
########################################
# Base Tasks
########################################
def build():
pass
def install():
ok.run([install_phoenix, install_orpheus, install_client]).run(post_install)
def default():
ok.run(orpheus)