build (455B)
1 #!/usr/bin/env bash 2 3 set -eo pipefail 4 5 env=$1 6 7 npm run i18n 8 9 if [ "$env" == "staging" ] 10 then 11 export OUT_DIR="$PWD/out-staging" 12 export NEXT_PUBLIC_PURPLE_API_BASE_URL="https://api-staging.damus.io" 13 elif [ "$env" == "dev" ] 14 then 15 export OUT_DIR="$PWD/out-dev" 16 # Do not modify env vars for dev 17 else 18 export OUT_DIR="$PWD/out-production" 19 export NEXT_PUBLIC_PURPLE_API_BASE_URL="https://api.damus.io" 20 fi 21 22 npx next build 23 rm -rf "$OUT_DIR" 24 mv out "$OUT_DIR"