Skip to content

Commit

Permalink
improves script to receive yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
“Caio committed Mar 31, 2022
1 parent c7759e8 commit 5f299b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions _VERSION_MIGRATION/migrate-to-next.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
backup_folder_absolute_path = ""
maestro_v9_endpoint = ""
maestro_next_endpoint = ""
container_input_env_vars = ""
container_input_env_vars = {}


# BACKUP
Expand Down Expand Up @@ -60,7 +60,11 @@ def get_ports(ports):

def get_env(env):
for env_var in container_input_env_vars:
env.append(env_var)
exists_to_override = [(index, var) for index, var in enumerate(env) if env_var['name'] == var['name']]
if len(exists_to_override) > 0:
env[exists_to_override[0][0]] = env_var
else:
env.append(env_var)

return env

Expand Down

0 comments on commit 5f299b9

Please sign in to comment.