feat: enforce conf file expectations

This commit is contained in:
Marc 2024-05-09 00:39:02 -04:00
parent ba88c17f6a
commit 7c1e949d7e

View file

@ -11,6 +11,8 @@ tasks:
desc: Builds a service by name. desc: Builds a service by name.
prefix: "build image: {{ .CLI_ARGS }}" prefix: "build image: {{ .CLI_ARGS }}"
interactive: true interactive: true
preconditions:
- test -f {{.CONFIG_ROOT}}/common.env
cmds: cmds:
- rm -rf {{.SERVICES_ROOT}}/{{.CLI_ARGS}} - rm -rf {{.SERVICES_ROOT}}/{{.CLI_ARGS}}
- git clone "git@forge-ssh.karnov.club:spadinastan/{{.CLI_ARGS}}.git" "{{.SERVICES_ROOT}}/{{.CLI_ARGS}}" - git clone "git@forge-ssh.karnov.club:spadinastan/{{.CLI_ARGS}}.git" "{{.SERVICES_ROOT}}/{{.CLI_ARGS}}"
@ -21,6 +23,9 @@ tasks:
start: start:
desc: Starts a service by name. desc: Starts a service by name.
prefix: "start: {{ .CLI_ARGS }}" prefix: "start: {{ .CLI_ARGS }}"
preconditions:
- test -f {{.CONFIG_ROOT}}/common.env
- test -f {{.CONFIG_ROOT}}/{{.CLI_ARGS}}.env
cmds: cmds:
- rm -rf {{.SERVICES_ROOT}}/{{.CLI_ARGS}} - rm -rf {{.SERVICES_ROOT}}/{{.CLI_ARGS}}
- git clone "git@forge-ssh.karnov.club:spadinastan/{{.CLI_ARGS}}.git" "{{.SERVICES_ROOT}}/{{.CLI_ARGS}}" - git clone "git@forge-ssh.karnov.club:spadinastan/{{.CLI_ARGS}}.git" "{{.SERVICES_ROOT}}/{{.CLI_ARGS}}"
@ -33,6 +38,8 @@ tasks:
stop: stop:
desc: Stops a service by name. desc: Stops a service by name.
prefix: "stop: {{ .CLI_ARGS }}" prefix: "stop: {{ .CLI_ARGS }}"
preconditions:
- test -f {{.CONFIG_ROOT}}/common.env
cmds: cmds:
- rm -rf {{.SERVICES_ROOT}}/{{.CLI_ARGS}} - rm -rf {{.SERVICES_ROOT}}/{{.CLI_ARGS}}
- git clone "git@forge-ssh.karnov.club:spadinastan/{{.CLI_ARGS}}.git" "{{.SERVICES_ROOT}}/{{.CLI_ARGS}}" - git clone "git@forge-ssh.karnov.club:spadinastan/{{.CLI_ARGS}}.git" "{{.SERVICES_ROOT}}/{{.CLI_ARGS}}"