36 lines
772 B
Bash
Executable file
36 lines
772 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=0.49.9
|
|
APP=metabase
|
|
DEPOT=https://github.com/metabase/metabase.git
|
|
GIT_VERSION=v$VERSION
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bookworm
|
|
IMAGE_SIZE=14
|
|
PACKAGE_DEPENDENCY="build-essential default-jdk curl nodejs yarn"
|
|
|
|
main(){
|
|
base_package_upgrade
|
|
configure_depot_yarn
|
|
configure_depot_nodejs 18
|
|
install_package_dependency
|
|
install_clojure
|
|
get_git_source
|
|
build
|
|
makedeb
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}/
|
|
PATH=$PATH:/usr/local/bin
|
|
npx browserslist@latest --update-db
|
|
./bin/build.sh
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
cp /tmp/${APP}/target/uberjar/metabase.jar ${PATH_DEB}/usr/share/metabase/
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|