2121 open_project_cloud_site ,
2222 print_package_renamed_warning ,
2323 table ,
24+ get_available_environments ,
2425)
2526from .validators .addon import validate_addon
2627from .validators .boilerplate import validate_boilerplate
@@ -208,7 +209,7 @@ def sort_projects(items):
208209@click .option (
209210 "--backup/--no-backup" , default = None , help = "Take a backup on deployment."
210211)
211- @click .argument ("stage" , default = "test" , type = click .Choice ([ 'test' , 'live' ] ))
212+ @click .argument ("stage" , default = "test" , type = click .Choice (get_available_environments () ))
212213@allow_remote_id_override
213214@click .pass_obj
214215def project_deploy (obj , remote_id , stage , backup ):
@@ -217,7 +218,7 @@ def project_deploy(obj, remote_id, stage, backup):
217218
218219
219220@project .command (name = "deploy-log" )
220- @click .argument ("stage" , default = "test" , type = click .Choice ([ 'test' , 'live' ] ))
221+ @click .argument ("stage" , default = "test" , type = click .Choice (get_available_environments () ))
221222@allow_remote_id_override
222223@click .pass_obj
223224def project_deploy_log (obj , remote_id , stage ):
@@ -418,7 +419,7 @@ def project_pull():
418419
419420
420421@project_pull .command (name = "db" )
421- @click .argument ("stage" , default = "test" , type = click .Choice ([ 'test' , 'live' ] ))
422+ @click .argument ("stage" , default = "test" , type = click .Choice (get_available_environments () ))
422423@allow_remote_id_override
423424@click .pass_obj
424425def pull_db (obj , remote_id , stage ):
@@ -432,7 +433,7 @@ def pull_db(obj, remote_id, stage):
432433
433434
434435@project_pull .command (name = "media" )
435- @click .argument ("stage" , default = "test" , type = click .Choice ([ 'test' , 'live' ] ))
436+ @click .argument ("stage" , default = "test" , type = click .Choice (get_available_environments () ))
436437@allow_remote_id_override
437438@click .pass_obj
438439def pull_media (obj , remote_id , stage ):
@@ -449,7 +450,7 @@ def project_push():
449450
450451
451452@project_push .command (name = "db" )
452- @click .argument ("stage" , default = "test" , type = click .Choice ([ 'test' , 'live' ] ))
453+ @click .argument ("stage" , default = "test" , type = click .Choice (get_available_environments () ))
453454@click .option (
454455 "-d" ,
455456 "--dumpfile" ,
@@ -487,7 +488,7 @@ def push_db(obj, remote_id, stage, dumpfile, noinput):
487488
488489
489490@project_push .command (name = "media" )
490- @click .argument ("stage" , default = "test" , type = click .Choice ([ 'test' , 'live' ] ))
491+ @click .argument ("stage" , default = "test" , type = click .Choice (get_available_environments () ))
491492@click .option (
492493 "--noinput" , is_flag = True , default = False , help = "Don't ask for confirmation"
493494)
0 commit comments