diff --git a/make_maingate_package.ps1 b/make_maingate_package.ps1 new file mode 100644 index 0000000..1a89ec0 --- /dev/null +++ b/make_maingate_package.ps1 @@ -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