vaultwarden-web/scripts/apply_patches.sh
BlackDex 87f3999a0b
Update to web-vault v2022.11.1
This PR updates the web-vault to v2022.11.1
It also replaces the main logo and top left icon to indicate it is
Vaultwarden.

And the footer text has been change to `Vaultwarden (unofficial Bitwarden® server)`

This hopefully helps causing less confusion.
2022-12-01 00:17:56 +01:00

25 lines
884 B
Bash
Executable file

#!/usr/bin/env bash
set -o pipefail -o errexit
# If a patch was not provided, try to choose one
if [[ -z ${PATCH_NAME} ]]; then
# If a patch with the same name as the ref exists, use it
if [ -f "../patches/${VAULT_VERSION}.patch" ]; then
echo "Exact patch file found, using that"
PATCH_NAME="${VAULT_VERSION}.patch"
else
echo "Patch file not found, using latest"
# If not, use the latest one
PATCH_NAME="$(find ../patches -printf "%f\\n" | sort -V | tail -n1)"
fi
fi
echo "Patching images"
cp -vf ../resources/logo-dark@2x.png ./apps/web/src/images/logo-dark@2x.png
cp -vf ../resources/logo-white@2x.png ./apps/web/src/images/logo-white@2x.png
cp -vf ../resources/icon-white.png ./apps/web/src/images/icon-white.png
echo "Using patch: ${PATCH_NAME}"
git apply "../patches/${PATCH_NAME}" --reject
echo "Patching successful!"