refactor distribution script to use packaged format

This commit is contained in:
Frede Hundewadt 2023-11-08 17:51:34 +01:00
parent 8c2547c18a
commit b376ee2193
5 changed files with 22 additions and 6 deletions

View file

@ -1,8 +1,8 @@
{ {
"appInfo": { "appInfo": {
"name": "Wonky Online", "name": "Wonky Online",
"version": "297.0", "version": "298.0",
"rc": false, "rc": true,
"sandBox": true, "sandBox": true,
"image": "grumpy-coder.png", "image": "grumpy-coder.png",
"sdk": "dotnet 8.0" "sdk": "dotnet 8.0"

View file

@ -5,6 +5,8 @@ if [[ -z $1 ]]; then
exit 1 exit 1
fi fi
BUILD="/a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/"
DIST="/a/projects/inno/version-sync/client"
FILE="$PWD/Wonky.Client/wwwroot/appsettings.json" FILE="$PWD/Wonky.Client/wwwroot/appsettings.json"
FOLDER="alpha-client" FOLDER="alpha-client"
@ -22,7 +24,9 @@ sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}"
dotnet clean dotnet clean
dotnet publish -c release dotnet publish -c release
cp --recursive /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/* "/a/projects/inno/version-sync/${FOLDER}" cp --recursive "${BUILD}" "${DIST}/${FOLDER}"
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "${DIST}/${FOLDER}.7z" "${DIST}/${FOLDER}"
rm -r "/a/projects/inno/version-sync/client/${FOLDER}"
sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://dev.innotec.dk\",|g' "${FILE}" sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://dev.innotec.dk\",|g' "${FILE}"
sed -i 's|\"rc\".*|\"rc\": true,|g' "${FILE}" sed -i 's|\"rc\".*|\"rc\": true,|g' "${FILE}"

View file

@ -5,6 +5,8 @@ if [[ -z $1 ]]; then
exit 1 exit 1
fi fi
BUILD="/a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/"
DIST="/a/projects/inno/version-sync/client"
FILE="$PWD/Wonky.Client/wwwroot/appsettings.json" FILE="$PWD/Wonky.Client/wwwroot/appsettings.json"
FOLDER="edu-${1}" FOLDER="edu-${1}"
@ -22,7 +24,9 @@ sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}"
dotnet clean dotnet clean
dotnet publish -c release dotnet publish -c release
cp --recursive /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/ "/a/projects/inno/version-sync/client/${FOLDER}" cp --recursive "${BUILD}" "${DIST}/${FOLDER}"
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "${DIST}/${FOLDER}.7z" "${DIST}/${FOLDER}"
rm -r "/a/projects/inno/version-sync/client/${FOLDER}"
# RESET TO DEVELOPMENT # RESET TO DEVELOPMENT
sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}" sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}"

View file

@ -5,6 +5,8 @@ if [[ -z $1 ]]; then
exit 1 exit 1
fi fi
BUILD="/a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/"
DIST="/a/projects/inno/version-sync/client"
FILE="$PWD/Wonky.Client/wwwroot/appsettings.json" FILE="$PWD/Wonky.Client/wwwroot/appsettings.json"
FOLDER="next-${1}" FOLDER="next-${1}"
@ -22,7 +24,9 @@ sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://zeta.innotec.dk\",|g' "${FILE}"
dotnet clean dotnet clean
dotnet publish -c release dotnet publish -c release
cp --recursive /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/ "/a/projects/inno/version-sync/client/${FOLDER}" cp --recursive "${BUILD}" "${DIST}/${FOLDER}"
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "${DIST}/${FOLDER}.7z" "${DIST}/${FOLDER}"
rm -r "/a/projects/inno/version-sync/client/${FOLDER}"
# RESET TO DEVELOPMENT # RESET TO DEVELOPMENT
sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}" sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}"

View file

@ -5,6 +5,8 @@ if [[ -z $1 ]]; then
exit 1 exit 1
fi fi
BUILD="/a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/"
DIST="/a/projects/inno/version-sync/client"
FILE="$PWD/Wonky.Client/wwwroot/appsettings.json" FILE="$PWD/Wonky.Client/wwwroot/appsettings.json"
FOLDER="prod-${1}" FOLDER="prod-${1}"
@ -22,7 +24,9 @@ sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://zeta.innotec.dk\",|g' "${FILE}"
dotnet clean dotnet clean
dotnet publish -c release dotnet publish -c release
cp --recursive /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/ "/a/projects/inno/version-sync/client/${FOLDER}" cp --recursive "${BUILD}" "${DIST}/${FOLDER}"
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "${DIST}/${FOLDER}.7z" "${DIST}/${FOLDER}"
rm -r "/a/projects/inno/version-sync/client/${FOLDER}"
# RESET TO DEVELOPMENT # RESET TO DEVELOPMENT
sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}" sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}"