-
Notifications
You must be signed in to change notification settings - Fork 2
/
Tiltfile
91 lines (84 loc) · 3.31 KB
/
Tiltfile
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
# ╭─────────────────────────────────────────────────────────╮
# │ Enforce a minimum Tilt version, so labels are supported │
# │ https://docs.tilt.dev/api.html#api.version_settings │
# ╰─────────────────────────────────────────────────────────╯
version_settings(constraint='>=0.22.1')
docker_build(
"ffi-gdal_gdal2",
context='.',
dockerfile='./Dockerfile.gdal2',
build_args={"GDAL_VERSION": "2.4.4"},
ignore=[
"tmp/*",
"coverage/",
"spec/examples.txt",
"Gemfile.lock"
],
live_update=[
sync('.', '/usr/src/ffi-gdal'),
run('bundle install', trigger='ffi-gdal.gemspec'), restart_container()
]
)
docker_build(
"ffi-gdal_gdal3",
context='.',
dockerfile='./Dockerfile.gdal3',
ignore=[
"tmp/*",
"coverage/",
"spec/examples.txt",
"Gemfile.lock"
],
live_update=[
sync('.', '/usr/src/ffi-gdal'),
run('bundle install', trigger='ffi-gdal.gemspec'), restart_container()
]
)
# ╓────────────╖
# ║ UI Buttons ║
# ╙────────────╜
load('ext://uibutton', 'cmd_button')
# ╭──────────────────────────────────────────────────────╮
# │ Make the same buttons for gdal2 and gdal3 containers │
# ╰──────────────────────────────────────────────────────╯
for gdal_version in ['gdal2', 'gdal3']:
cmd_button(gdal_version + ":bundle install",
argv=['docker', 'compose', 'run', gdal_version, 'bin/bundle', 'install'],
resource=gdal_version,
icon_name='install_desktop',
text='bundle install'
)
cmd_button(gdal_version + ":bundle update",
argv=['docker', 'compose', 'run', gdal_version, 'bin/bundle', 'update'],
resource=gdal_version,
icon_name='refresh',
text='bundle update'
)
cmd_button(gdal_version + ":rake spec",
argv=['docker', 'compose', 'run', gdal_version, 'bin/rake', 'spec'],
resource=gdal_version,
icon_name='bolt',
text='rake spec'
)
cmd_button(gdal_version + ":rubocop",
argv=['docker', 'compose', 'run', gdal_version, 'bin/rubocop'],
resource=gdal_version,
icon_name='search_check',
text='rubocop'
)
cmd_button(gdal_version + ":rubocop fix (safe)",
argv=['docker', 'compose', 'run', gdal_version, 'bin/rubocop', '-a'],
resource=gdal_version,
icon_name='done_outline',
text='rubocop -a'
)
cmd_button(gdal_version + ":rubocop fix (all)",
argv=['docker', 'compose', 'run', gdal_version, 'bin/rubocop', '-A'],
resource=gdal_version,
icon_name='done_all',
text='rubocop -A'
)
docker_compose("docker-compose.yml")
dc_resource('gdal2')
dc_resource('gdal3')
# vim:ft=Tiltfile syntax=python