diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-10-11 10:41:25 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-10-11 10:41:25 +0530 |
commit | 8f809cfd8592a7b406ef9cdb6bfb42380ac8621f (patch) | |
tree | 8cbad05e1556474e5e1bde0a4b987ca39864348f /bin | |
parent | 319dad6f01794ecfeda8f82b6d8f55b0e691c18a (diff) | |
download | deployment-8f809cfd8592a7b406ef9cdb6bfb42380ac8621f.tar.gz deployment-8f809cfd8592a7b406ef9cdb6bfb42380ac8621f.tar.bz2 deployment-8f809cfd8592a7b406ef9cdb6bfb42380ac8621f.zip |
build system
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/taler-deployment | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/bin/taler-deployment b/bin/taler-deployment index 79e0bde..0031d4e 100755 --- a/bin/taler-deployment +++ b/bin/taler-deployment @@ -8,6 +8,8 @@ import os.path import subprocess import time from pathlib import Path +from dataclasses import dataclass +from typing import List, Callable activate_template = """\ #!/bin/bash @@ -37,6 +39,13 @@ export TALER_ENV_URL_BACKOFFICE="https://backoffice.{envname}.taler.net/" """ +@dataclass +class Repo: + name: str + url: str + deps: List[str] + + @click.group() def cli(): pass @@ -90,29 +99,29 @@ def bootstrap(envname): exec(cfgtext, cfg.__dict__) repos = [ - ("gnunet", "git://gnunet.org/gnunet.git"), - ("libmicrohttpd", "git://gnunet.org/libmicrohttpd.git"), - ("twister", "git://git.taler.net/twister"), - ("bank", "git://git.taler.net/bank"), - ("merchant", "git://git.taler.net/merchant"), - ("landing", "git://git.taler.net/landing"), - ("exchange", "git://git.taler.net/exchange"), - ("donations", "git://git.taler.net/donations"), - ("blog", "git://git.taler.net/blog"), - ("survey", "git://git.taler.net/survey"), - ("backoffice", "git://git.taler.net/backoffice"), + Repo("gnunet", "git://gnunet.org/gnunet.git", []), + Repo("libmicrohttpd", "git://gnunet.org/libmicrohttpd.git", []), + Repo("twister", "git://git.taler.net/twister", ["gnunet", "exchange"]), + Repo("bank", "git://git.taler.net/bank", []), + Repo("merchant", "git://git.taler.net/merchant", ["exchange", "libmicrohttpd"]), + Repo("landing", "git://git.taler.net/landing", []), + Repo("exchange", "git://git.taler.net/exchange", ["gnunet", "libmicrohttpd"]), + Repo("donations", "git://git.taler.net/donations", []), + Repo("blog", "git://git.taler.net/blog", []), + Repo("survey", "git://git.taler.net/survey", []), + Repo("backoffice", "git://git.taler.net/backoffice", []), ] sources = home / "sources" - for (r_name, r_url) in repos: - r_dir = home / "sources" / r_name + for r in repos: + 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 + ["git", "-C", sources.as_posix(), "clone", r.url], check=True ) - tag = getattr(cfg, "tag_" + r_name) + tag = getattr(cfg, "tag_" + r.name) subprocess.run(["git", "-C", r_dir.as_posix(), "fetch"], check=True) subprocess.run( ["git", "-C", r_dir.as_posix(), "checkout", "-q", "-f", tag, "--"], |