taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 09bf18f46f8c685f7b05211803afeffbbea3eb5e
parent 02c804788c7d18f994c11b4daeebd21d5ce7d7ef
Author: Florian Dold <florian.dold@gmail.com>
Date:   Sat,  2 Nov 2019 17:13:37 +0100

separate update from bootstrap

Diffstat:
Mbin/taler-deployment | 42++++++++++++++++++++++++++++--------------
1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/bin/taler-deployment b/bin/taler-deployment @@ -400,20 +400,8 @@ def switch_demo(color) -> None: active_home.symlink_to(f"/home/demo-{color}") -@cli.command() -def bootstrap() -> None: - """Bootstrap a GNU Taler deployment.""" - - home = Path.home() - - cfg = load_envcfg() - env_info = get_env_info(cfg) - repos = env_info.repos - envname = env_info.name - - # read Python-style config - - sources = home / "sources" +def update_repos(repos): + sources = Path.home() / "sources" for r in repos: r_dir = home / "sources" / r.name @@ -429,6 +417,30 @@ def bootstrap() -> None: check=True, ) + +@cli.command() +def update(): + """Update sources repos""" + home = Path.home() + cfg = load_envcfg() + env_info = get_env_info(cfg) + repos = env_info.repos + update_repos(repos) + + +@cli.command() +def bootstrap() -> None: + """Bootstrap a GNU Taler deployment.""" + + home = Path.home() + + cfg = load_envcfg() + env_info = get_env_info(cfg) + repos = env_info.repos + envname = env_info.name + + # read Python-style config + with (home / "activate").open("w") as f: f.write( activate_template.format( @@ -439,6 +451,8 @@ def bootstrap() -> None: ) ) + update_repos() + (home / "sockets").mkdir(parents=True, exist_ok=True) if envname in ("test", "int"):