2022-02-12 18:30:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-12-08 06:42:53 +01:00
|
|
|
VERSION=0.45.1
|
2022-03-06 00:37:44 +01:00
|
|
|
APP=metabase
|
|
|
|
DEPOT=https://github.com/metabase/metabase.git
|
|
|
|
GIT_VERSION=v$VERSION
|
2022-03-24 02:48:03 +01:00
|
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
2022-02-28 23:26:47 +01:00
|
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
2022-03-06 00:37:44 +01:00
|
|
|
IMAGE_SIZE=10
|
2022-10-08 03:58:00 +02:00
|
|
|
PACKAGE_DEPENDENCY="build-essential default-jdk curl nodejs yarn"
|
2022-02-28 23:26:47 +01:00
|
|
|
|
2022-11-01 22:14:36 +01:00
|
|
|
main(){
|
|
|
|
base_package_upgrade
|
2022-08-17 20:35:16 +02:00
|
|
|
configure_depot_yarn
|
|
|
|
configure_depot_nodejs
|
2022-09-21 01:59:25 +02:00
|
|
|
install_package_dependency
|
|
|
|
install_clojure
|
2022-11-01 22:14:36 +01:00
|
|
|
get_git_source
|
|
|
|
build
|
|
|
|
makedeb
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2022-03-06 00:37:44 +01:00
|
|
|
cd /tmp/${APP}/
|
|
|
|
PATH=$PATH:/usr/local/bin
|
|
|
|
./bin/build
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
makedeb(){
|
2022-02-24 00:02:53 +01:00
|
|
|
PATH_DEB=/tmp/src/rootfs
|
2022-03-24 01:50:20 +01:00
|
|
|
|
2022-03-06 00:37:44 +01:00
|
|
|
cp /tmp/${APP}/target/uberjar/metabase.jar ${PATH_DEB}/usr/share/metabase/
|
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
|
|
|
}
|