use generic file name to store compilation instruction
Add GLPI (with github clone to patch install)
This commit is contained in:
parent
38ded86d9f
commit
853e9f431b
28 changed files with 170 additions and 50 deletions
55
ressources/vaultwarden-web/debmaker
Executable file
55
ressources/vaultwarden-web/debmaker
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=vaultwarden-web
|
||||
VERSION=2.25.1
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=$VERSION-2
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
apt install -y --no-install-recommends wget fakeroot dpkg ca-certificates build-essential git python
|
||||
wget -qO - https://deb.nodesource.com/setup_16.x | bash
|
||||
apt-get update
|
||||
apt-get install -y nodejs
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
GIT_VERSION=$1
|
||||
|
||||
GIT_VERSION=$1
|
||||
git clone --depth 1 -b ${GIT_VERSION} https://github.com/bitwarden/web.git /tmp/web-vault
|
||||
cd /tmp/web-vault
|
||||
git submodule update --init --recursive
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/dani-garcia/bw_web_builds.git
|
||||
cd bw_web_builds
|
||||
PATCH=$(git tag --sort=v:refname | tail -n1)
|
||||
git checkout ${PATCH}
|
||||
PATCH_FILE=$(ls patches/ | sort -V | tail -n 1)
|
||||
cp patches/${PATCH_FILE} ../web-vault/
|
||||
|
||||
cd /tmp/web-vault
|
||||
git apply ${PATCH_FILE}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/web-vault
|
||||
npm install
|
||||
npm run dist:oss:selfhost
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
GIT_VERSION=$1
|
||||
DEB_VERSION=$2
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
cp -fr /tmp/web-vault/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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue