taler-deployment

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

commit 8f809cfd8592a7b406ef9cdb6bfb42380ac8621f
parent 319dad6f01794ecfeda8f82b6d8f55b0e691c18a
Author: Florian Dold <florian.dold@gmail.com>
Date:   Fri, 11 Oct 2019 10:41:25 +0530

build system

Diffstat:
Mbin/taler-deployment | 39++++++++++++++++++++++++---------------
Mtaler-build/update_libgnurl.sh | 2++
Mtaler-build/update_libmicrohttpd.sh | 2++
3 files changed, 28 insertions(+), 15 deletions(-)

diff --git 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, "--"], diff --git a/taler-build/update_libgnurl.sh b/taler-build/update_libgnurl.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -eu + cd $HOME/gnurl git clean -fxd diff --git a/taler-build/update_libmicrohttpd.sh b/taler-build/update_libmicrohttpd.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -eu + cd $HOME/libmicrohttpd/ git clean -fdx