1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00

Add support for bookworm

This commit is contained in:
Salamandar 2023-12-03 12:13:43 +01:00 committed by Salamandar
parent d662b924b3
commit 41b7ac2576

View file

@ -4,21 +4,26 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
pkg_image="vaultwarden/server"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================
_download_vaultwarden_from_docker() { _download_vaultwarden_from_docker() {
docker_image="vaultwarden/server"
debian=$(lsb_release --codename --short)
if [[ $debian = "bullseye" ]]; then
docker_version="$(ynh_app_upstream_version)"
elif [[ $debian = "bookworm" ]]; then
docker_version="$(ynh_app_upstream_version)-alpine"
fi
# Download, check integrity, uncompress the source of vaultwarden from app.src to his build directory
docker_arg="" docker_arg=""
# Fixup for armhf # Fixup for armhf
if [ "$YNH_ARCH" == "armhf" ]; then if [ "$YNH_ARCH" == "armhf" ]; then
docker_arg="--os_arch_variant=linux/arm/v7" docker_arg="--os_arch_variant=linux/arm/v7"
fi fi
ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$pkg_image:$(ynh_app_upstream_version)" $docker_arg
ynh_docker_image_extract --dest_dir="$install_dir/build/" --image_spec="$docker_image:$docker_version" $docker_arg
# Move files from the extract to the live directory # Move files from the extract to the live directory
ynh_secure_remove --file="$install_dir/live/" ynh_secure_remove --file="$install_dir/live/"