mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
[bug] upgrade script add env var already present
This commit is contained in:
parent
6ec7ecca9a
commit
a28a3ad651
@ -1,9 +1,12 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Refactored subscription new/renew/free extend interfaces and API
|
||||
- Updated production documentation
|
||||
- Updated SSO documentation
|
||||
- Improved stripe subscription process with better error handling
|
||||
- The upgrade script will check and report the ability to access the hub API
|
||||
- Fix a bug: the upgrade script won't add environment variables that are already present anymore
|
||||
- Fix a bug: admin cannot take or renew a subscription for a member from member/edit interface
|
||||
- Fix a bug: missing translations
|
||||
- Fix a bug: the upgrade script report an invalid version to upgrade to
|
||||
- Fix a bug: invalid amount provided to the PayZen payment gateway when using a currency with anything else than 2 decimals
|
||||
|
@ -136,8 +136,14 @@ add_environments()
|
||||
{
|
||||
for ENV in "${ENVIRONMENTS[@]}"; do
|
||||
if [[ "$ENV" =~ ^[A-Z0-9_]+=.*$ ]]; then
|
||||
printf "\e[91m::\e[0m \e[1mInserting variable %s..\e[0m.\n" "$ENV"
|
||||
printf "# added on %s\n%s\n" "$(date +%Y-%m-%d\ %R)" "$ENV" >> "config/env"
|
||||
local var=$(echo "$ENV" | cut -d '=' -f1)
|
||||
grep "$var" ./config/env
|
||||
if [[ "$?" = 1 ]]; then
|
||||
printf "\e[91m::\e[0m \e[1mInserting variable %s..\e[0m.\n" "$ENV"
|
||||
printf "# added on %s\n%s\n" "$(date +%Y-%m-%d\ %R)" "$ENV" >> "config/env"
|
||||
else
|
||||
printf "\e[93m[ ⚠ ] %s is already defined in config/env, ignoring...\e[39m\n" "$var"
|
||||
fi
|
||||
else
|
||||
printf "\e[93m[ ⚠ ] Ignoring invalid option: -e %s.\e[39m\n Given value is not valid environment variable, please see http://env.doc.fab.mn\n" "$ENV"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user