Skip to content

Commit

Permalink
fix: add config_exists to the command in order to add a new api key
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmogos committed Sep 23, 2020
1 parent 2fcad59 commit 09c37b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cli/src/commands/deploy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def get_description(self):
def get_options(self):
return [{"name": "index_name",
"description": "name of the config to deploy"},
{"name": "config_exists", "description": "the config is already in the repo"},
{"name": "push_config", "description": "push the config to master", "optional": True}]

def run(self, args):
Expand All @@ -20,4 +21,4 @@ def run(self, args):
exit(1)
else:
from deployer.src.index import deploy_config
deploy_config(args[0], args[1] if len(args) > 1 else True)
deploy_config(args[0], args[1], args[2] if len(args) > 2 else True)
4 changes: 2 additions & 2 deletions deployer/src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def print_init():
print("")


def deploy_config(config_name, push_config=True):
def deploy_config(config_name, config_exists, push_config=True):
from os import environ, path

print_init()
Expand All @@ -38,7 +38,7 @@ def deploy_config(config_name, push_config=True):
print("Folder: " + config_folder + " does not exist")
exit()

config_exists = config_name in fetchers.get_configs_from_repos()
# config_exists = config_name in fetchers.get_configs_from_repos()

if push_config == True:
# Not using the config manager to avoid it stashing the config that we want to push
Expand Down

0 comments on commit 09c37b2

Please sign in to comment.