finalized automated build for web

This commit is contained in:
2020-08-09 14:43:33 +09:00
parent 94a9d18c02
commit 56b3448138
19 changed files with 83 additions and 35 deletions

View File

@@ -1,3 +1,5 @@
#!/bin/sh
mkdir build
cd main-web/client
npm run build
@@ -8,8 +10,18 @@ npm run build
cd ../../
mv tools/janken/tool build
cd main-web/server
export catherine_db_user=$(aws --region=ap-northeast-1 ssm get-parameter --name "db-username" --with-decryption --output text --query Parameter.Value)
export catherine_db_pass=$(aws --region=ap-northeast-1 ssm get-parameter --name "db-password" --with-decryption --output text --query Parameter.Value)
cat > .env <<EOL
DB_USER=${catherine_db_user}
DB_PASS=${catherine_db_pass}
EOL
npm run build
cd ../../
cp main-web/server/.env build/
cp main-web/server/package.json build/
cp main-web/server/tsconfig.json build/
cp main-web/server/tslint.json build/
mv main-web/server/build build/server
tar czf build.tar.gz build/
rm -rf build/