mirror of
https://github.com/Luzifer/ots.git
synced 2024-12-23 14:19:36 -05:00
8cc6f23b04
Signed-off-by: Knut Ahlers <knut@ahlers.me>
47 lines
886 B
Plaintext
47 lines
886 B
Plaintext
# Install Node deps on change of package.json
|
|
local_resource(
|
|
'npm',
|
|
cmd='npm i',
|
|
deps=['package.json'],
|
|
)
|
|
|
|
# Rebuild frontend if source files change
|
|
local_resource(
|
|
'frontend',
|
|
cmd='node ./ci/build.mjs',
|
|
deps=['src'],
|
|
resource_deps=['npm'],
|
|
)
|
|
|
|
# Generate translation files on source change
|
|
local_resource(
|
|
'translations',
|
|
cmd='make translate',
|
|
deps=['i18n.yaml'],
|
|
)
|
|
|
|
# Rebuild and run Go webserver on code changes
|
|
local_resource(
|
|
'server',
|
|
cmd='go build .',
|
|
deps=[
|
|
'api.go',
|
|
'frontend',
|
|
'helpers.go',
|
|
'main.go',
|
|
'pkg',
|
|
'storage.go',
|
|
'tplFuncs.go',
|
|
],
|
|
ignore=['ots', 'src'],
|
|
serve_cmd='./ots --listen=:15641',
|
|
serve_env={
|
|
'CUSTOMIZE': 'customize.yaml',
|
|
},
|
|
readiness_probe=probe(
|
|
http_get=http_get_action(15641, path='/api/healthz'),
|
|
initial_delay_secs=1,
|
|
),
|
|
resource_deps=['frontend', 'translations'],
|
|
)
|