commit 91e61c6cdf2737495ac975c41006aa575d488673
parent 10914fb958a1611d5b706ae0980ad31f19b698b7
Author: Florian Dold <florian.dold@gmail.com>
Date: Fri, 11 Oct 2019 22:45:50 +0530
build subcommand
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/bin/taler-deployment b/bin/taler-deployment
@@ -59,7 +59,7 @@ class Repo:
name: str
url: str
deps: List[str]
- builder: Callable
+ builder: Callable[[Repo, Path], None]
@click.group()
@@ -131,7 +131,7 @@ def build_gnunet(r: Repo, p: Path):
(p / "taler-buildstamp").touch()
-def build_exchange(r, p):
+def build_exchange(r: Repo, p: Path):
update_checkout(r, p)
subprocess.run(["./bootstrap"], check=True)
pfx = Path.home() / "local"
@@ -295,7 +295,7 @@ def update_repos():
s.unlink()
-def get_stale_repos():
+def get_stale_repos() -> List[Repo]:
timestamps = {}
stale = []
for r in repos:
@@ -305,7 +305,7 @@ def get_stale_repos():
timestamps[r.name] = time.time()
stale.append(r)
continue
- timestamps[r.name] = s.stat().st_mtime
+ ts = timestamps[r.name] = s.stat().st_mtime
for dep in r.deps:
if timestamps[dep] > ts:
stale.append(r)
@@ -314,7 +314,7 @@ def get_stale_repos():
@cli.command()
-def build():
+def build() -> None:
"""Build the deployment from source."""
ensure_activated()
update_repos()
@@ -323,12 +323,12 @@ def build():
for r in stale:
p = Path.home() / "sources" / r.name
os.chdir(p.as_posix())
- r.builder(p)
+ r.builder(r, p) # type: ignore
@cli.command()
@click.argument("envname", type=click.Choice(["test", "int", "demo"]))
-def bootstrap(envname):
+def bootstrap(envname) -> None:
"""Bootstrap a GNU Taler deployment."""
home = Path.home()