mirror of
https://github.com/runcitadel/core.git
synced 2024-11-11 16:30:38 +00:00
Better app updating UI
This commit is contained in:
parent
16c9dbe615
commit
f95bbb66f5
|
@ -6,5 +6,38 @@
|
|||
|
||||
CITADEL_ROOT="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../..)"
|
||||
|
||||
"${CITADEL_ROOT}/scripts/app" update
|
||||
"${CITADEL_ROOT}/scripts/app" start installed
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 20, "description": "Downloading updates", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
"${CITADEL_ROOT}/scripts/app" update &
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 30, "description": "Downloading updates", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
sleep 2
|
||||
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 50, "description": "Downloading updates", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
|
||||
wait
|
||||
|
||||
"${CITADEL_ROOT}/scripts/app" start installed &
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 60, "description": "Starting apps", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
sleep 15
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 70, "description": "Starting apps", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
sleep 10
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 80, "description": "Starting apps", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
sleep 5
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 90, "description": "Starting apps", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
wait
|
||||
cat <<EOF > "$CITADEL_ROOT"/statuses/update-status.json
|
||||
{"state": "installing", "progress": 100, "description": "Update successful", "updateTo": "$RELEASE"}
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue
Block a user