1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

Unified and documented upgrade exit codes

This commit is contained in:
Sylvain 2021-06-01 09:03:24 +02:00
parent 1bee09442c
commit e08157b5f6
2 changed files with 10 additions and 3 deletions

View File

@ -11,6 +11,7 @@
- Footprints are now generated in a more reproductible way
- Task to reset the stripe payment methods in test mode
- Validate on server side the reservation of slots restricted to subscribers
Unified and documented upgrade exit codes
- Fix a bug: build status badge is not working
- Fix a bug: unable to set date formats during installation
- Fix a bug: unable to cancel the upgrade before it begins

View File

@ -125,7 +125,7 @@ compile_assets()
PG_ID=$(docker-compose ps -q postgres)
if [[ "$PG_ID" = "" ]]; then
printf "\e[91m[ ❌ ] PostgreSQL container is not running, unable to compile the assets\e[39m\nExiting..."
exit 1
exit 4
fi
PG_NET_ID=$(docker inspect "$PG_ID" -f "{{json .NetworkSettings.Networks }}" | jq -r '.[] .NetworkID')
clean_env_file
@ -147,7 +147,7 @@ upgrade()
add_environments
if ! docker-compose pull "$SERVICE"; then
printf "\e[91m[ ❌ ] An error occurred, detected service name: %s\e[39m\nExiting..." "$SERVICE"
exit 1
exit 4
fi
BRANCH='master'
if yq eval '.services.*.image | select(. == "sleede/fab-manager*")' docker-compose.yml | grep -q ':dev'; then BRANCH='dev'; fi
@ -207,7 +207,13 @@ Options:
-p <string> Run the preprocessing command (TODO DEPLOY)
-c <string> Provides additional upgrade command, run in the context of the app (TODO DEPLOY)
-s <string> Executes a remote script (TODO DEPOY)
-e <string> Adds the environment variable to config/env\n" "$(basename "$0")" 1>&2
-e <string> Adds the environment variable to config/env\n" "$(basename "$0")
Return codes:
0 Upgrade terminated successfully
1 Configuration required
2 Aborted by user
3 Version not supported
4 Unexpected error" 1>&2
exit 1
}