28 lines
734 B
PowerShell
28 lines
734 B
PowerShell
# $ErrorActionPreference = 'SilentlyContinue'
|
|
|
|
del maingate.zip
|
|
|
|
cd ..
|
|
cd maingate-console
|
|
|
|
Copy-Item .env.example.prod .env
|
|
npm run build
|
|
|
|
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
|