commit e1b8f9192b6a0f890f8df8a574cc352101a5dfca
parent 1eb0300e03c8836e9111116dc8470aaf7ba24a4f
Author: Florian Dold <florian.dold@gmail.com>
Date: Thu, 10 Oct 2019 23:27:09 +0530
bootstrap: currency
Diffstat:
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/bin/taler-deployment b/bin/taler-deployment
@@ -41,6 +41,10 @@ def cli():
pass
+# map from environment name to currenct
+currmap = {"test": "TESTKUDOS", "demo": "KUDOS", "int": "INTKUDOS"}
+
+
@cli.command()
@click.argument("envname", type=click.Choice(["test", "int", "demo"]))
def bootstrap(envname):
@@ -73,7 +77,9 @@ def bootstrap(envname):
r_dir = home / "sources" / r_name
if not r_dir.exists():
r_dir.mkdir(parents=True, exist_ok=True)
- subprocess.run(["git", "-C", sources.as_posix(), "clone", r_url], check=True)
+ subprocess.run(
+ ["git", "-C", sources.as_posix(), "clone", r_url], check=True
+ )
tag = getattr(cfg, "tag_" + r_name)
subprocess.run(["git", "-C", r_dir.as_posix(), "fetch"], check=True)
subprocess.run(
@@ -82,7 +88,11 @@ def bootstrap(envname):
)
with (home / "activate").open("w") as f:
- f.write(activate_template.format(envname=envname, timestamp=str(time.time())))
+ f.write(
+ activate_template.format(
+ envname=envname, timestamp=str(time.time()), currency=currmap[envname]
+ )
+ )
(home / "sockets").mkdir(parents=True, exist_ok=True)
(home / "taler-data").mkdir(parents=True, exist_ok=True)