34 lines
812 B
Bash
Executable file
34 lines
812 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=2024.6.2
|
|
APP=vaultwarden-web
|
|
BITWARDEN_VERSION=v${VERSION}
|
|
GIT_VERSION=${BITWARDEN_VERSION}b
|
|
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() {
|
|
export NODE_OPTIONS=--max-old-space-size=8192
|
|
cd /tmp/${APP}
|
|
echo ${BITWARDEN_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
|
|
}
|