From 3c703f517d36b9bb8c0768f8b28fddad0cc93891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=B6ppach?= Date: Fri, 23 Feb 2024 00:16:34 +0100 Subject: [PATCH 1/3] Update to .NET 8.0 to fix building with bitwarden v2024.2.2 (#187) * Update to .NET 8.0 to fix building with bitwarden v2024.2.2 * Also update license gen to .NET 8.0 --- build.sh | 2 +- src/bitBetter/Dockerfile | 2 +- src/bitBetter/bitBetter.csproj | 2 +- src/licenseGen/Dockerfile | 4 ++-- src/licenseGen/licenseGen.csproj | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 4371c0c..f1156eb 100755 --- a/build.sh +++ b/build.sh @@ -13,7 +13,7 @@ echo "Building BitBetter for BitWarden version $BW_VERSION" cp "$DIR/.keys/cert.cert" "$DIR/src/bitBetter/.keys" -docker run --rm -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/sdk:6.0 sh build.sh +docker run --rm -v "$DIR/src/bitBetter:/bitBetter" -w=/bitBetter mcr.microsoft.com/dotnet/sdk:8.0 sh build.sh docker build --no-cache --build-arg BITWARDEN_TAG=bitwarden/api:$BW_VERSION --label com.bitwarden.product="bitbetter" -t bitbetter/api "$DIR/src/bitBetter" # --squash docker build --no-cache --build-arg BITWARDEN_TAG=bitwarden/identity:$BW_VERSION --label com.bitwarden.product="bitbetter" -t bitbetter/identity "$DIR/src/bitBetter" # --squash diff --git a/src/bitBetter/Dockerfile b/src/bitBetter/Dockerfile index 07bf05c..085de41 100644 --- a/src/bitBetter/Dockerfile +++ b/src/bitBetter/Dockerfile @@ -1,7 +1,7 @@ ARG BITWARDEN_TAG FROM ${BITWARDEN_TAG} -COPY bin/Debug/netcoreapp6.0/publish/* /bitBetter/ +COPY bin/Release/netcoreapp8.0/publish/* /bitBetter/ COPY ./.keys/cert.cert /newLicensing.cer RUN set -e; set -x; \ diff --git a/src/bitBetter/bitBetter.csproj b/src/bitBetter/bitBetter.csproj index 43d79ed..2650329 100644 --- a/src/bitBetter/bitBetter.csproj +++ b/src/bitBetter/bitBetter.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp6.0 + netcoreapp8.0 diff --git a/src/licenseGen/Dockerfile b/src/licenseGen/Dockerfile index 2ca6a37..fa5bcc1 100644 --- a/src/licenseGen/Dockerfile +++ b/src/licenseGen/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 as build +FROM mcr.microsoft.com/dotnet/sdk:8.0 as build WORKDIR /licenseGen @@ -12,6 +12,6 @@ RUN set -e; set -x; \ FROM bitbetter/api -COPY --from=build /licenseGen/bin/Debug/netcoreapp6.0/publish/* /app/ +COPY --from=build /licenseGen/bin/Release/netcoreapp8.0/publish/* /app/ ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ] diff --git a/src/licenseGen/licenseGen.csproj b/src/licenseGen/licenseGen.csproj index 0edfd9a..f3fd1a5 100644 --- a/src/licenseGen/licenseGen.csproj +++ b/src/licenseGen/licenseGen.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp6.0 + netcoreapp8.0 From 12da7d724963588cc219e19dbfed3a729c8a3fa5 Mon Sep 17 00:00:00 2001 From: kasperk81 <83082615+kasperk81@users.noreply.github.com> Date: Sat, 30 Mar 2024 11:31:27 +0200 Subject: [PATCH 2/3] use correct framework (#193) * use correct framework * use correct framework --- src/bitBetter/Dockerfile | 2 +- src/bitBetter/bitBetter.csproj | 2 +- src/licenseGen/Dockerfile | 2 +- src/licenseGen/licenseGen.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bitBetter/Dockerfile b/src/bitBetter/Dockerfile index 085de41..d66b1df 100644 --- a/src/bitBetter/Dockerfile +++ b/src/bitBetter/Dockerfile @@ -1,7 +1,7 @@ ARG BITWARDEN_TAG FROM ${BITWARDEN_TAG} -COPY bin/Release/netcoreapp8.0/publish/* /bitBetter/ +COPY bin/Release/net8.0/publish/* /bitBetter/ COPY ./.keys/cert.cert /newLicensing.cer RUN set -e; set -x; \ diff --git a/src/bitBetter/bitBetter.csproj b/src/bitBetter/bitBetter.csproj index 2650329..faa5594 100644 --- a/src/bitBetter/bitBetter.csproj +++ b/src/bitBetter/bitBetter.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp8.0 + net8.0 diff --git a/src/licenseGen/Dockerfile b/src/licenseGen/Dockerfile index fa5bcc1..a8a183e 100644 --- a/src/licenseGen/Dockerfile +++ b/src/licenseGen/Dockerfile @@ -12,6 +12,6 @@ RUN set -e; set -x; \ FROM bitbetter/api -COPY --from=build /licenseGen/bin/Release/netcoreapp8.0/publish/* /app/ +COPY --from=build /licenseGen/bin/Release/net8.0/publish/* /app/ ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ] diff --git a/src/licenseGen/licenseGen.csproj b/src/licenseGen/licenseGen.csproj index f3fd1a5..95fdf29 100644 --- a/src/licenseGen/licenseGen.csproj +++ b/src/licenseGen/licenseGen.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp8.0 + net8.0 From a65277198ca675fe81510daa0a2935f90894fb3d Mon Sep 17 00:00:00 2001 From: Michiel Hazelhof Date: Sun, 30 Jun 2024 03:33:01 +0200 Subject: [PATCH 3/3] Use new location (#202) --- src/licenseGen/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/licenseGen/Program.cs b/src/licenseGen/Program.cs index b97f548..50c791d 100644 --- a/src/licenseGen/Program.cs +++ b/src/licenseGen/Program.cs @@ -398,7 +398,7 @@ namespace bitwardenSelfLicensor var type = core.GetType("Bit.Core.Models.Business.OrganizationLicense"); var licenseTypeEnum = core.GetType("Bit.Core.Enums.LicenseType"); - var planTypeEnum = core.GetType("Bit.Core.Enums.PlanType"); + var planTypeEnum = core.GetType("Bit.Core.Billing.Enums.PlanType"); var license = Activator.CreateInstance(type);