From ae20e6da9d5afd69d8d05c187f3ee69663d1fa56 Mon Sep 17 00:00:00 2001 From: Genva Date: Mon, 16 Jun 2025 20:34:14 +0200 Subject: [PATCH] Revert "Remove unnecessary changes in LicensingService.cs" This reverts commit d8465e1aecf308ce8b009594d2b58544041fb80a. --- build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index da2b6d5..36a2ead 100755 --- a/build.sh +++ b/build.sh @@ -12,9 +12,15 @@ echo "Building BitBetter for BitWarden version $BW_VERSION" # Prepare Bitwarden server repository rm -rf $DIR/server git clone --branch "v${BW_VERSION}" --depth 1 https://github.com/bitwarden/server.git $DIR/server + +# Optional, replacing the thumbprint in code has no actual effect +old_thumbprint=$(openssl x509 -fingerprint -noout -in $DIR/server/src/Core/licensing.cer | cut -d= -f2 | tr -d ':') +new_thumbprint=$(openssl x509 -fingerprint -noout -in $DIR/.keys/cert.cert | cut -d= -f2 | tr -d ':') +sed -i -e "s/$old_thumbprint/$new_thumbprint/g" $DIR/server/src/Core/Services/Implementations/LicensingService.cs + +# Replace certificate file cp $DIR/.keys/cert.cert $DIR/server/src/Core/licensing.cer -# Build docker images docker build --no-cache --label com.bitwarden.product="bitbetter" $DIR/server -f $DIR/server/src/Api/Dockerfile -t bitbetter/api docker build --no-cache --label com.bitwarden.product="bitbetter" $DIR/server -f $DIR/server/src/Identity/Dockerfile -t bitbetter/identity