diff --git a/Wonky.Client/Components/AppSandbox.razor b/Wonky.Client/Components/AppSandbox.razor index 4233329e..52108206 100644 --- a/Wonky.Client/Components/AppSandbox.razor +++ b/Wonky.Client/Components/AppSandbox.razor @@ -18,7 +18,7 @@ @if (_app!.Sandbox) { -
DEMO SANDKASSE
+
DEMO SANDKASSE
} @code { diff --git a/Wonky.Client/Components/AppVersion.razor b/Wonky.Client/Components/AppVersion.razor index 961424e9..8a9594d8 100644 --- a/Wonky.Client/Components/AppVersion.razor +++ b/Wonky.Client/Components/AppVersion.razor @@ -16,28 +16,15 @@ @using Wonky.Entity.Configuration @using Microsoft.Extensions.Options +
v@(_app?.Version)
+ @if (_app!.Rc) {
RC
} -@if (_production) -{ -
v.@_app?.Version
-} -else -{ -
v.@_app?.Version
-} -@if (_app!.Rc) -{ -
RC
-} -
@_app!.Sdk
-@*@if (_app!.Sandbox) -{ -
EDU DEMO
-}*@ +@_app!.Sdk + @code { [Inject] IOptions? AppInfo { get; set; } @@ -47,8 +34,5 @@ else protected override void OnInitialized() { _app = AppInfo?.Value; - // var revision = _app?.Version.Split("."); - // var x = Convert.ToInt32(revision?[^1]); - // _production = x % 2 == 0; } } diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index e0454392..dfc50b34 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -1,7 +1,7 @@ { "appInfo": { "name": "Wonky Online", - "version": "171.0", + "version": "173.0", "rc": true, "sandBox": true, "image": "grumpy-coder.png", @@ -9,8 +9,8 @@ }, "Logging": { "LogLevel": { - "Default": "None", - "System": "None", + "Default": "Debug", + "System": "Debug", "Microsoft": "None" }, "Debug": { diff --git a/alpha-build.sh b/alpha-build.sh old mode 100644 new mode 100755 index ae8830c0..56878ccf --- a/alpha-build.sh +++ b/alpha-build.sh @@ -1,5 +1,26 @@ #/usr/bin/env bash +if [[ -z $1 ]]; then + echo "no version" + exit 1 +fi + +FILE="$PWD/Wonky.Client/wwwroot/appsettings.json" +FOLDER="alpha-client" + +sed -i "s|\"version\".*|\"version\": \"$1\",|g" "${FILE}" +sed -i 's|\"rc\".*|\"rc\": false,|g' "${FILE}" +sed -i 's|\"sandbox\".*|\"sandbox\": true,|g' "${FILE}" + +sed -i 's|\"Default": \"None\",|\"Default": \"Debug\",|g' "${FILE}" +sed -i 's|\"System": \"None\",|\"System": \"Debug\",|g' "${FILE}" + +sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}" + dotnet publish -c release -rm -rf /a/projects/inno/version-sync/alpha-client/* -cp /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net8.0/publish/* /a/projects/inno/version-sync/alpha-client/ -rn + +cp --recursive /a/projects/inno/a/Wonky.Client/Wonky.Client/bin/Release/net7.0/publish/* "/a/projects/inno/version-sync/${FOLDER}" + +sed -i 's|\"rc\".*|\"rc\": true,|g' "${FILE}" + +printf "\n==> done building: ${FOLDER} ${1}\n" diff --git a/eta-build.sh b/eta-build.sh new file mode 100755 index 00000000..582618cd --- /dev/null +++ b/eta-build.sh @@ -0,0 +1,32 @@ +#!/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}" +sed -i 's|\"sandbox\".*|\"sandbox\": true,|g' "${FILE}" + +sed -i 's|\"Default": \"Debug\",|\"Default": \"None\",|g' "${FILE}" +sed -i 's|\"System": \"Debug\",|\"System": \"None\",|g' "${FILE}" + +sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}" + +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}" + +# RESET TO DEVELOPMENT +sed -i 's|\"sandbox\".*|\"sandbox\": true,|g' "${FILE}" + +sed -i 's|\"Default": \"None\",|\"Default": \"Debug\",|g' "${FILE}" +sed -i 's|\"System": \"None\",|\"System": \"Debug\",|g' "${FILE}" + +sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}" + +printf "\n==> done building: ${FOLDER} EDU SANDBOX\n" diff --git a/zeta-build.sh b/zeta-build.sh new file mode 100755 index 00000000..4418a970 --- /dev/null +++ b/zeta-build.sh @@ -0,0 +1,32 @@ +#!/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}" + +sed -i 's|\"Default": \"Debug\",|\"Default": \"None\",|g' "${FILE}" +sed -i 's|\"System": \"Debug\",|\"System": \"None\",|g' "${FILE}" + +sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://zeta.innotec.dk\",|g' "${FILE}" + +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}" + +# RESET TO DEVELOPMENT +sed -i 's|\"sandbox\".*|\"sandbox\": true,|g' "${FILE}" + +sed -i 's|\"Default": \"None\",|\"Default": \"Debug\",|g' "${FILE}" +sed -i 's|\"System": \"None\",|\"System": \"Debug\",|g' "${FILE}" + +sed -i 's|\"baseUrl\".*|\"baseUrl\": \"https://eta.innotec.dk\",|g' "${FILE}" + +printf "\n==> done building: ${FOLDER} RC\n"