mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
run the chain:all command before db:migrate
This commit is contained in:
parent
0b2310e57a
commit
1bee09442c
@ -19,6 +19,7 @@
|
||||
- `scripts/run-tests.sh` renamed to `scripts/tests.sh`
|
||||
- [BREAKING CHANGE] GET `open_api/v1/invoices` won't return `stp_invoice_id` OR `stp_payment_intent_id` anymore. The new field `payment_gateway_object` will contain some similar data if the invoice was paid online by card.
|
||||
- [BREAKING CHANGE] GET `open_api/v1/invoices` won't return `invoiced_id`, `invoiced_type` OR `invoiced.created_at` anymore. The new field `main_object` will contain the equivalent data.
|
||||
- [TODO DEPLOY] before running the database migration (db:migrate), run: `rails fablab:chain:all`
|
||||
- [TODO DEPLOY] `rails fablab:stripe:set_gateway`
|
||||
- [TODO DEPLOY] `rails fablab:maintenance:rebuild_stylesheet`
|
||||
- [TODO DEPLOY] `\curl -sSL https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/rename-adminsys.sh | bash`
|
||||
|
@ -5,7 +5,8 @@ parseparams()
|
||||
COMMANDS=()
|
||||
SCRIPTS=()
|
||||
ENVIRONMENTS=()
|
||||
while getopts "hys:c:e:" opt; do
|
||||
PREPROCESSING=()
|
||||
while getopts "hys:p:c:e:" opt; do
|
||||
case "${opt}" in
|
||||
y)
|
||||
Y=true
|
||||
@ -13,6 +14,9 @@ parseparams()
|
||||
s)
|
||||
SCRIPTS+=("$OPTARG")
|
||||
;;
|
||||
p)
|
||||
PREPROCESSING+=("$OPTARG")
|
||||
;;
|
||||
c)
|
||||
COMMANDS+=("$OPTARG")
|
||||
;;
|
||||
@ -161,6 +165,13 @@ upgrade()
|
||||
if [[ "$confirm" = "n" ]]; then exit 4; fi
|
||||
fi
|
||||
done
|
||||
for PRE in "${PREPROCESSING[@]}"; do
|
||||
printf "\e[91m::\e[0m \e[1mRunning preprocessing command %s...\e[0m\n" "$PRE"
|
||||
if ! docker-compose run --rm "$SERVICE" bundle exec "$PRE"; then
|
||||
printf "\e[91m[ ❌ ] Something went wrong while running \"%s\", please check the logs above.\e[39m\nExiting...\n" "$PRE"
|
||||
exit 4
|
||||
fi
|
||||
done
|
||||
compile_assets
|
||||
if ! docker-compose run --rm "$SERVICE" bundle exec rake db:migrate; then
|
||||
printf "\e[91m[ ❌ ] Something went wrong while migrating the database, please check the logs above.\e[39m\nExiting...\n"
|
||||
@ -193,6 +204,7 @@ usage()
|
||||
Options:
|
||||
-h Print this message and quit
|
||||
-y Answer yes to all questions
|
||||
-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
|
||||
|
Loading…
x
Reference in New Issue
Block a user