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"
|
|
|
|
|
|
|
|
if [[ ! -z "${ENV_NAME}" ]]; then
|
2023-04-12 07:38:26 +00:00
|
|
|
if [[ "${ENV_NAME}" != "ops-vega" ]]; then
|
|
|
|
flags="--env=${ENV_NAME} $flags"
|
|
|
|
fi
|
2023-04-03 13:53:50 +00:00
|
|
|
fi
|
|
|
|
|
2023-03-24 15:42:33 +00:00
|
|
|
if [ "${APP}" = "trading" ]; then
|
2023-04-03 13:53:50 +00:00
|
|
|
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-04-03 13:53:50 +00:00
|
|
|
yarn nx build ${APP} $flags
|
2023-03-24 15:42:33 +00:00
|
|
|
fi
|