2023-04-03 13:53:50 +00:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
2023-03-24 15:42:33 +00:00
|
|
|
export PATH="/app/node_modules/.bin:$PATH"
|
2023-04-03 13:53:50 +00:00
|
|
|
|
|
|
|
flags="--network-timeout 100000 --pure-lockfile"
|
2023-07-04 11:01:25 +00:00
|
|
|
envCmd=""
|
2023-04-03 13:53:50 +00:00
|
|
|
|
|
|
|
if [[ ! -z "${ENV_NAME}" ]]; then
|
2023-04-12 07:38:26 +00:00
|
|
|
if [[ "${ENV_NAME}" != "ops-vega" ]]; then
|
2023-07-04 11:01:25 +00:00
|
|
|
envCmd="envCmd="yarn env-cmd -f ./apps/${APP}/.env.${ENV_NAME}"
|
2023-04-12 07:38:26 +00:00
|
|
|
fi
|
2023-04-03 13:53:50 +00:00
|
|
|
fi
|
|
|
|
|
2023-03-24 15:42:33 +00:00
|
|
|
if [ "${APP}" = "trading" ]; then
|
2023-07-04 11:01:25 +00:00
|
|
|
$envCmd yarn nx export ${APP} $flags
|
2023-03-24 15:42:33 +00:00
|
|
|
mv /app/dist/apps/trading/exported/ /app/tmp
|
|
|
|
rm -rf /app/dist/apps/trading
|
|
|
|
mv /app/tmp /app/dist/apps/trading
|
|
|
|
else
|
2023-07-04 11:01:25 +00:00
|
|
|
$envCmd yarn nx build ${APP} $flags
|
2023-03-24 15:42:33 +00:00
|
|
|
fi
|