forked from tilt-dev/tilt-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tiltfile
25 lines (21 loc) · 985 Bytes
/
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
config.define_string("auth")
config.define_string("default_config_file")
config.define_string("ngrok_config_version")
config.define_string("ngrok_config_tls_scheme")
cfg = config.parse()
auth = cfg.get('auth', '')
default_config_file = cfg.get('default_config_file', '')
ngrok_config_version = cfg.get('ngrok_config_version', '2')
config_file = str(local('mktemp "${TMPDIR:-/tmp}/tilt-ngrok.XXXXXXXXX"')).strip()
ngrok_config_tls_scheme = cfg.get('ngrok_config_tls_scheme', 'http')
local_resource(
name='ngrok:status',
serve_cmd=['./ngrok-run.sh', config_file],
serve_env={'TILT_NGROK_DEFAULT_CONFIG_FILE': default_config_file},
links=['http://localhost:4040/'],
deps=['./ngrok-run.sh', config_file])
local_resource(
name='ngrok:operator',
serve_cmd=['./ngrok-operator.sh', config_file],
serve_env={'TILT_NGROK_AUTH': auth, 'TILT_NGROK_CONFIG_VERSION': ngrok_config_version, 'TILT_NGROK_CONFIG_TLS_SCHEME': ngrok_config_tls_scheme},
deps=['./ngrok-operator.sh'])