Skip to content

Commit

Permalink
BitBetter: update build.sh / update-bitwarden.sh
Browse files Browse the repository at this point in the history
Bitwarden has changed the way they report version numbers for
self-hosted installations.

Fixes jakeswenson#134

Credit to @Ayitaka for the fix

Tested and Verified, Updated install to 1.47.1

Signed-off-by: Donald Hoskins <grommish@gmail.com>
  • Loading branch information
Grommish committed Apr 8, 2022
1 parent a58baf0 commit 9a70610
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

DIR=`dirname "$0"`
DIR=`exec 2>/dev/null;(cd -- "$DIR") && cd -- "$DIR"|| cd "$DIR"; unset PWD; /usr/bin/pwd || /bin/pwd || pwd`
BW_VERSION="$(curl --silent https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh | grep 'COREVERSION="' | sed 's/^[^"]*"//; s/".*//')"
BW_VERSION=$(curl -sL https://go.btwrdn.co/bw-sh-versions | grep '^ *"'coreVersion'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//')
#BW_VERSION="$(curl --silent https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh | grep 'COREVERSION="' | sed 's/^[^"]*"//; s/".*//')"

echo "Building BitBetter for BitWarden version $BW_VERSION"

Expand Down
2 changes: 1 addition & 1 deletion update-bitwarden.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ask () {
}

SCRIPT_BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
BW_VERSION="$(curl --silent https://raw.githubusercontent.com/bitwarden/self-host/master/bitwarden.sh | grep 'COREVERSION="' | sed 's/^[^"]*"//; s/".*//')"
BW_VERSION=$(curl -sL https://go.btwrdn.co/bw-sh-versions | grep '^ *"'coreVersion'":' | awk -F\: '{ print $2 }' | sed -e 's/,$//' -e 's/^"//' -e 's/"$//')

echo "Starting Bitwarden update, newest server version: $BW_VERSION"

Expand Down

0 comments on commit 9a70610

Please sign in to comment.