2023-06-20 11:24:22 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [[ -z $1 ]]; then
|
|
|
|
echo "no version"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
FILE="$PWD/Wonky.Client/wwwroot/appsettings.json"
|
|
|
|
FOLDER="eta-${1}"
|
|
|
|
|
|
|
|
sed -i "s|\"version\".*|\"version\": \"${1}\",|g" "${FILE}"
|
|
|
|
sed -i 's|\"rc\".*|\"rc\": true,|g' "${FILE}"
|
2023-06-27 13:50:05 +02:00
|
|
|
sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}"
|
2023-06-20 11:24:22 +02:00
|
|
|
|
|
|
|
sed -i 's|\"Default": \"Debug\",|\"Default": \"None\",|g' "${FILE}"
|
|
|
|
sed -i 's|\"System": \"Debug\",|\"System": \"None\",|g' "${FILE}"
|
2023-06-27 13:50:05 +02:00
|
|
|
sed -i 's|\"Microsoft\": \"Information\",|\"Microsoft\": \"None\",|g' "${FILE}"
|
2023-06-20 11:24:22 +02:00
|
|
|
|
|
|
|
sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}"
|
|
|
|
|
2023-06-27 13:50:05 +02:00
|
|
|
dotnet clean
|
2023-06-20 11:24:22 +02:00
|
|
|
dotnet publish -c release
|
|
|
|
|
2023-06-27 13:50:05 +02:00
|
|
|
cp --recursive /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net7.0/publish/ "/a/projects/inno/version-sync/client/${FOLDER}"
|
2023-06-20 11:24:22 +02:00
|
|
|
|
|
|
|
# RESET TO DEVELOPMENT
|
2023-06-27 13:50:05 +02:00
|
|
|
sed -i 's|\"sandBox\".*|\"sandBox\": true,|g' "${FILE}"
|
2023-06-20 11:24:22 +02:00
|
|
|
|
|
|
|
sed -i 's|\"Default": \"None\",|\"Default": \"Debug\",|g' "${FILE}"
|
|
|
|
sed -i 's|\"System": \"None\",|\"System": \"Debug\",|g' "${FILE}"
|
2023-06-27 13:50:05 +02:00
|
|
|
sed -i 's|\"Microsoft\": \"None\",|\"Microsoft\": \"Information\",|g' "${FILE}"
|
2023-06-20 11:24:22 +02:00
|
|
|
|
|
|
|
sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}"
|
|
|
|
|
|
|
|
printf "\n==> done building: ${FOLDER} EDU SANDBOX\n"
|