2023-05-09 16:24:39 +00:00
|
|
|
#!/bin/bash -e
|
|
|
|
yarn --pure-lockfile
|
2023-05-10 11:33:17 +00:00
|
|
|
app=${1:-trading}
|
2023-07-04 11:01:25 +00:00
|
|
|
envCmd="envCmd="yarn env-cmd -f ./apps/${app}/.env.${2:-mainnet}"
|
2023-05-09 16:24:39 +00:00
|
|
|
yarn install
|
|
|
|
if [ "${app}" = "trading" ]; then
|
2023-07-04 11:01:25 +00:00
|
|
|
$envCmd yarn nx export trading
|
2023-05-09 16:24:39 +00:00
|
|
|
DIST_LOCATION=dist/apps/trading/exported
|
|
|
|
else
|
2023-07-04 11:01:25 +00:00
|
|
|
$envCmd yarn nx build ${app}
|
2023-05-09 16:24:39 +00:00
|
|
|
DIST_LOCATION=dist/apps/${app}
|
|
|
|
fi
|
|
|
|
cp -r $DIST_LOCATION dist-result
|