2022-02-12 18:30:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-12-23 01:04:28 +01:00
|
|
|
VERSION=4.37.5
|
2022-02-28 23:26:47 +01:00
|
|
|
APP=authelia
|
2022-03-04 21:47:14 +01:00
|
|
|
DEPOT=https://github.com/authelia/authelia.git
|
2022-03-04 20:50:46 +01:00
|
|
|
GIT_VERSION=v${VERSION}
|
2022-05-26 16:27:16 +02:00
|
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
2022-02-28 23:26:47 +01:00
|
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
2022-08-12 23:00:22 +02:00
|
|
|
IMAGE_SIZE=6
|
2022-10-08 03:58:00 +02:00
|
|
|
PACKAGE_DEPENDENCY="build-essential nodejs"
|
2022-02-28 23:26:47 +01:00
|
|
|
|
2022-10-08 03:58:00 +02:00
|
|
|
main(){
|
|
|
|
base_package_upgrade
|
|
|
|
envinit
|
|
|
|
get_git_source
|
|
|
|
build
|
|
|
|
makedeb
|
|
|
|
}
|
2022-02-20 23:33:43 +01:00
|
|
|
|
2022-02-12 18:30:28 +01:00
|
|
|
envinit() {
|
2022-08-12 23:00:22 +02:00
|
|
|
configure_depot_nodejs
|
2022-10-08 03:58:00 +02:00
|
|
|
install_package_dependency
|
2022-08-05 06:12:11 +02:00
|
|
|
install_go
|
2022-05-02 22:08:37 +02:00
|
|
|
wget -qO - https://get.pnpm.io/install.sh | sh -
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2022-03-04 21:47:14 +01:00
|
|
|
cd /tmp/${APP}/
|
2022-02-20 23:33:43 +01:00
|
|
|
PATH=$PATH:/usr/local/go/bin:/root/.local/share/pnpm
|
|
|
|
./cmd/authelia-scripts/authelia-scripts build
|
2022-02-12 18:30:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
makedeb(){
|
2022-02-24 00:02:53 +01:00
|
|
|
PATH_DEB=/tmp/src/rootfs
|
2022-02-12 18:30:28 +01:00
|
|
|
|
2022-03-04 21:47:14 +01:00
|
|
|
cp /tmp/${APP}/dist/authelia ${PATH_DEB}/usr/bin/authelia
|
|
|
|
cp /tmp/${APP}/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml
|
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
|
|
|
}
|