Wonky.Client/zeta-build.sh

36 lines
1.2 KiB
Bash
Raw Normal View History

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="zeta-${1}"
sed -i "s|\"version\":.*|\"version\": \"$1\",|g" "${FILE}"
sed -i 's|\"rc\":.*|\"rc\": true,|g' "${FILE}"
sed -i 's|\"sandBox\":.*|\"sandBox\": false,|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}"
sed -i 's|\"Microsoft\": \"Information\",|\"Microsoft\": \"None\",|g' "${FILE}"
2023-06-20 11:24:22 +02:00
sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://zeta.innotec.dk\",|g' "${FILE}"
dotnet clean
2023-06-20 11:24:22 +02:00
dotnet publish -c release
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
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}"
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} RC\n"