47 lines
1.0 KiB
Bash
Executable File
47 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=23.1.0
|
|
APP=cloudbeaver
|
|
DEPOT=https://github.com/dbeaver/cloudbeaver.git
|
|
GIT_VERSION=last
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bookworm
|
|
IMAGE_SIZE=5
|
|
PACKAGE_DEPENDENCY="nodejs yarn maven default-jdk"
|
|
|
|
main(){
|
|
base_package_upgrade
|
|
envinit
|
|
get_git_source
|
|
build
|
|
makedeb
|
|
}
|
|
|
|
envinit() {
|
|
configure_depot_yarn
|
|
configure_depot_nodejs 14
|
|
install_package_dependency
|
|
npm install -g lerna
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}/deploy
|
|
./build.sh
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
cp -fr /tmp/${APP}/deploy/cloudbeaver ${PATH_DEB}/usr/share/
|
|
|
|
mv ${PATH_DEB}/usr/share/cloudbeaver/workspace ${PATH_DEB}/var/lib/cloudbeaver/
|
|
ln -s /var/lib/cloudbeaver/workspace ${PATH_DEB}/usr/share/cloudbeaver/workspace
|
|
|
|
mkdir ${PATH_DEB}/etc/
|
|
mv ${PATH_DEB}/usr/share/cloudbeaver/conf ${PATH_DEB}/etc/cloudbeaver/
|
|
ln -s /etc/cloudbeaver ${PATH_DEB}/usr/share/cloudbeaver/conf
|
|
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|