fix(fractal): start Docker Compose in CI

This commit is contained in:
Oliver Davies 2023-10-08 09:59:03 +01:00
parent 4b67b0edb1
commit 764db99ef8

View file

@ -4,11 +4,12 @@
set -eu set -eu
{% set isDocker = flake is not defined %}
{% set isFlake = flake is defined %} {% set isFlake = flake is defined %}
PATH="$PATH:./node_modules/.bin" PATH="$PATH:./node_modules/.bin"
{% if not isFlake %} {% if isDocker %}
# If we're running in CI we need to disable TTY allocation for docker compose # If we're running in CI we need to disable TTY allocation for docker compose
# commands that enable it by default, such as exec and run. # commands that enable it by default, such as exec and run.
TTY="${TTY:-}" TTY="${TTY:-}"
@ -19,10 +20,18 @@ fi
# Remove and generated or temporary files. # Remove and generated or temporary files.
function build { function build {
{% if isDocker %}
cmd fractal build "${@}" cmd fractal build "${@}"
{% if not isFlake %}
fractal build "${@}"
{% endif %}
} }
function ci:build { function ci:build {
{% if isDocker %}
docker compose up -d
{% endif %}
build build
} }