debmaker/ressources/vaultwarden-web/debmaker

26 lines
697 B
Bash
Executable File

#!/bin/bash
VERSION=2022.12.0
APP=vaultwarden-web
GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=5
DEPOT=https://github.com/dani-garcia/bw_web_builds.git
PACKAGE_DEPENDENCY="build-essential python nodejs"
STEP="base_package_upgrade configure_depot_nodejs 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
}