test from source

This commit is contained in:
CanbiZ 2025-06-02 13:14:43 +02:00
parent 75242f4b9f
commit 1b72716590
2 changed files with 17 additions and 1 deletions

View File

@ -50,7 +50,7 @@ $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
msg_ok "Set up Database"
msg_info "Setup healthchecks"
fetch_and_deploy_gh_release "healthchecks/healthchecks"
install_from_gh_release "healthchecks" "healthchecks/healthchecks" "source"
cd /opt/healthchecks
$STD uv venv .venv
$STD source .venv/bin/activate

View File

@ -675,6 +675,22 @@ install_mongodb() {
msg_ok "MongoDB $MONGO_VERSION installed and started"
}
install_from_gh_release() {
local app="$1"
local repo="$2"
local mode="$3" # source|binary
local version="$4" # optional
local deb_name="$5" # optional
APP="$app"
INSTALL_DIR="/opt/$app"
VERSION="${version:-}"
SOURCE_PACKAGE="${deb_name:-}"
BUILD_SOURCE=$([[ "$mode" == "binary" ]] && echo 0 || echo 1)
fetch_and_deploy_gh_release "$repo"
}
# ------------------------------------------------------------------------------
# Downloads and deploys latest GitHub release tarball.
#