a
This commit is contained in:
parent
4bd13f3d23
commit
041af6c34d
1 changed files with 7 additions and 1 deletions
|
@ -13,7 +13,10 @@ def cli():
|
|||
@cli.command("setup")
|
||||
@click.option("--path", required=True)
|
||||
@click.option("--api_server", required=True)
|
||||
def setup(path, api_server):
|
||||
@click.option("--name", required=True)
|
||||
@click.option("--realm", required=True)
|
||||
@click.option("--seed", required=True)
|
||||
def setup(path, api_server, name, realm, seed):
|
||||
os.chdir(path)
|
||||
|
||||
repo_name = "ucloud-cli"
|
||||
|
@ -26,6 +29,9 @@ def setup(path, api_server):
|
|||
with open(os.path.join(repo_name, ".env"), "w") as f:
|
||||
content = (
|
||||
f"UCLOUD_API_SERVER={api_server}\n"
|
||||
f"OTP_NAME={name}\n"
|
||||
f"OTP_REALM={realm}\n"
|
||||
f"OTP_SEED={seed}\n"
|
||||
)
|
||||
f.writelines(content)
|
||||
|
||||
|
|
Loading…
Reference in a new issue