maingate 패키지 제작 스크립트

This commit is contained in:
2023-06-14 01:51:19 +09:00
parent 19729c0809
commit 0ea219c721

30
make_maingate_package.ps1 Normal file
View File

@ -0,0 +1,30 @@
# $ErrorActionPreference = 'SilentlyContinue'
del maingate.zip
cd ..
cd maingate-console
mv .env .env.old
cp .env.production .env
npm run build
del .env
mv .env.old .env
Remove-Item console -Force -Recurse -ErrorAction SilentlyContinue
Copy-Item build console -Recurse
Compress-Archive -Path console -DestinationPath ..\maingate\maingate.zip -Force
Remove-Item console -Force -Recurse
cd ..
cd maingate
$Env:GOOS="linux"
$Env:GOARCH="amd64"
go build -ldflags="-s -w" .
Compress-Archive -Path config.json -Update -DestinationPath maingate.zip
Compress-Archive -Path maingate -Update -DestinationPath maingate.zip
Compress-Archive -Path www -Update -DestinationPath maingate.zip
Compress-Archive -Path *-firebase-*.json -Update -DestinationPath maingate.zip