forked from michael.heier/citadel-core
d0bc4688d5
Co-authored-by: nolim1t - f6287b82CC84bcbd <nolim1t@users.noreply.github.com> Co-authored-by: Philipp Walter <philippwalter@pm.me>
26 lines
929 B
Bash
Executable File
26 lines
929 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# SPDX-FileCopyrightText: 2021-2022 Citadel and contributors
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
CITADEL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../..)"
|
|
|
|
RELEASE=$(cat "$CITADEL_ROOT"/statuses/update-status.json | jq .updateTo -r)
|
|
|
|
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
|
{"state": "installing", "progress": 30, "description": "Starting update", "updateTo": "$RELEASE"}
|
|
EOF
|
|
|
|
curl "https://raw.githubusercontent.com/runcitadel/core/${RELEASE}/db/dependencies.yml" > "$CITADEL_ROOT"/db/dependencies
|
|
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
|
{"state": "installing", "progress": 70, "description": "Starting new containers", "updateTo": "$RELEASE"}
|
|
EOF
|
|
|
|
"${CITADEL_ROOT}/scripts/start"
|
|
|
|
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
|
{"state": "success", "progress": 100, "description": "Successfully installed Citadel $RELEASE", "updateTo": ""}
|
|
EOF
|
|
|