refactor
This commit is contained in:
parent
b8d748f5f3
commit
dd0aad6740
56 changed files with 555 additions and 278 deletions
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
cd /tmp/web-vault
|
||||
npm install
|
||||
npm run dist:oss:selfhost
|
|
@ -1,8 +0,0 @@
|
|||
#/bin/bash
|
||||
apt install -y build-essential git python wget ca-certificates
|
||||
wget -qO - https://deb.nodesource.com/setup_16.x | bash
|
||||
#wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
|
||||
#echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
|
||||
apt-get update
|
||||
#apt-get install -y yarn nodejs
|
||||
apt-get install -y nodejs
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
PATH_BUILD=$1
|
||||
PATH_DEB=$2
|
||||
GIT_VERSION=$3
|
||||
|
||||
cp -fr ${PATH_BUILD}/tmp/web-vault/build/* ${PATH_DEB}/usr/share/vaultwarden-web
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/bash
|
||||
VERSION=$1
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/bitwarden/web.git web-vault
|
||||
cd /tmp/web-vault
|
||||
git checkout ${VERSION}
|
||||
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}
|
||||
cp patches/${PATCH}.patch ../web-vault/
|
||||
|
||||
cd /tmp/web-vault
|
||||
git apply ${PATCH}.patch
|
||||
|
49
ressources/vaultwarden-web/vaultwarden-web
Executable file
49
ressources/vaultwarden-web/vaultwarden-web
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
envinit() {
|
||||
apt install -y build-essential git python wget ca-certificates
|
||||
wget -qO - https://deb.nodesource.com/setup_16.x | bash
|
||||
#wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
|
||||
#echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
|
||||
apt-get update
|
||||
#apt-get install -y yarn nodejs
|
||||
apt-get install -y nodejs
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
VERSION=$1
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/bitwarden/web.git web-vault
|
||||
cd /tmp/web-vault
|
||||
git checkout ${VERSION}
|
||||
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}
|
||||
cp patches/${PATCH}.patch ../web-vault/
|
||||
|
||||
cd /tmp/web-vault
|
||||
git apply ${PATCH}.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/web-vault
|
||||
npm install
|
||||
npm run dist:oss:selfhost
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_BUILD=$1
|
||||
PATH_DEB=$2
|
||||
GIT_VERSION=$3
|
||||
|
||||
cp -fr ${PATH_BUILD}/tmp/web-vault/build/* ${PATH_DEB}/usr/share/vaultwarden-web
|
||||
}
|
||||
echo $1
|
||||
FUNC=$1
|
||||
shift
|
||||
${FUNC} $*
|
Loading…
Add table
Add a link
Reference in a new issue