2022-02-12 18:30:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-01-01 23:02:32 +01:00
|
|
|
VERSION=2022.12.0
|
2022-02-28 23:26:47 +01:00
|
|
|
APP=vaultwarden-web
|
|
|
|
GIT_VERSION=v$VERSION
|
2022-05-26 16:27:16 +02:00
|
|
|
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
2022-02-28 23:26:47 +01:00
|
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
2022-08-12 23:21:10 +02:00
|
|
|
IMAGE_SIZE=5
|
2022-08-12 23:00:22 +02:00
|
|
|
DEPOT=https://github.com/dani-garcia/bw_web_builds.git
|
2022-08-17 20:35:16 +02:00
|
|
|
PACKAGE_DEPENDENCY="build-essential python nodejs"
|
2022-02-28 23:26:47 +01:00
|
|
|
|
2022-08-17 20:35:16 +02:00
|
|
|
STEP="base_package_upgrade configure_depot_nodejs install_package_dependency get_git_source build makedeb"
|
2022-02-12 18:30:28 +01:00
|
|
|
|
|
|
|
build() {
|
2022-05-26 16:27:16 +02:00
|
|
|
cd /tmp/${APP}
|
2022-08-12 23:00:22 +02:00
|
|
|
echo web-$GIT_VERSION | ./package_web_vault.sh
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
makedeb(){
|
2022-02-24 00:02:53 +01:00
|
|
|
PATH_DEB=/tmp/src/rootfs
|
2022-02-12 18:30:28 +01:00
|
|
|
|
2022-08-12 23:00:22 +02:00
|
|
|
cp -fr /tmp/${APP}/web-vault/apps/web/build/* ${PATH_DEB}/usr/share/vaultwarden-web
|
2022-02-24 00:02:53 +01:00
|
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|