debmaker/ressources/vaultwarden-web/debmaker
2023-09-06 01:19:18 +02:00

32 lines
719 B
Bash
Executable file

#!/bin/bash
VERSION=2023.8.2
APP=vaultwarden-web
GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=5
DEPOT=https://github.com/dani-garcia/bw_web_builds.git
PACKAGE_DEPENDENCY="build-essential python-is-python3 nodejs"
main(){
base_package_upgrade
configure_depot_nodejs 18
install_package_dependency
get_git_source
build
makedeb
}
build() {
cd /tmp/${APP}
echo web-$GIT_VERSION | ./package_web_vault.sh
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp -fr /tmp/${APP}/web-vault/apps/web/build/* ${PATH_DEB}/usr/share/vaultwarden-web
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}