[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: sync repos
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: sync repos |
Date: |
Fri, 20 Dec 2019 01:44:11 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 3f4fff9 sync repos
3f4fff9 is described below
commit 3f4fff9ae43b20fc54034a86a9327d0c682578db
Author: Florian Dold <address@hidden>
AuthorDate: Fri Dec 20 01:44:08 2019 +0100
sync repos
---
bin/taler-deployment | 76 ++++++++++++++++++++++++++++++++--------------------
1 file changed, 47 insertions(+), 29 deletions(-)
diff --git a/bin/taler-deployment b/bin/taler-deployment
index 2d6c7a4..2c7b16a 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -81,7 +81,7 @@ currmap = {
"coverage": "TESTKUDOS",
"demo": "KUDOS",
"int": "INTKUDOS",
- "euro": "EUR"
+ "euro": "EUR",
}
@@ -270,7 +270,6 @@ def get_repos(envname):
return [Repo("docs", "git://gnunet.org/docs.git", [], build_docs)]
if envname == "coverage":
return [
-
Repo(
"libmicrohttpd",
"git://gnunet.org/libmicrohttpd.git",
@@ -284,7 +283,6 @@ def get_repos(envname):
["gnunet", "libmicrohttpd"],
build_exchange,
),
-
Repo(
"merchant",
"git://git.taler.net/merchant",
@@ -293,7 +291,6 @@ def get_repos(envname):
),
]
-
if envname == "euro":
return [
Repo(
@@ -315,7 +312,6 @@ def get_repos(envname):
["exchange", "libmicrohttpd"],
build_merchant,
),
-
Repo("bank", "git://git.taler.net/bank", [], build_bank),
Repo("landing", "git://git.taler.net/landing", [], build_landing),
Repo("donations", "git://git.taler.net/donations", [],
build_donations),
@@ -377,7 +373,6 @@ def ensure_activated():
sys.exit(1)
-
def update_repos(repos: List[Repo]) -> None:
for r in repos:
r_dir = Path.home() / "sources" / r.name
@@ -420,7 +415,7 @@ allowed_envs = (
"auditor-reporter",
"docs-builder",
"euro",
- "coverage"
+ "coverage",
)
@@ -476,24 +471,10 @@ def switch_demo(color) -> None:
active_home.symlink_to(f"/home/demo-{color}")
-@cli.command()
-def bootstrap() -> None:
- """Bootstrap a GNU Taler deployment."""
-
+def checkout_repos(r):
+ """Check out repos to the version specified in envcfg.py"""
home = Path.home()
-
- cfg = load_envcfg()
- if not cfg:
- print("Please create ~/envcfg.py (template in deployment.git can
help)")
- return 1
- env_info = get_env_info(cfg)
- repos = env_info.repos
- envname = env_info.name
-
- # read Python-style config
-
sources = home / "sources"
-
for r in repos:
r_dir = home / "sources" / r.name
if not r_dir.exists():
@@ -508,6 +489,39 @@ def bootstrap() -> None:
check=True,
)
+
+@cli.command()
+def sync_repos() -> None:
+ """Sync repos with the envcfg.py file."""
+ home = Path.home()
+ cfg = load_envcfg()
+ if not cfg:
+ print("Please create ~/envcfg.py (template in deployment.git can
help)")
+ return 1
+ env_info = get_env_info(cfg)
+ repos = env_info.repos
+ checkout_repos(r)
+ for r in repos:
+ r_dir = home / "sources" / r.name
+ subprocess.run(["git", "-C", r_dir.as_posix(), "clean", "-fdx"],
check=True)
+
+
+@cli.command()
+def bootstrap() -> None:
+ """Bootstrap a GNU Taler deployment."""
+
+ home = Path.home()
+
+ cfg = load_envcfg()
+ if not cfg:
+ print("Please create ~/envcfg.py (template in deployment.git can
help)")
+ return 1
+ env_info = get_env_info(cfg)
+ repos = env_info.repos
+ envname = env_info.name
+
+ checkout_repos(r)
+
with (home / "activate").open("w") as f:
f.write(
activate_template.format(
@@ -515,8 +529,7 @@ def bootstrap() -> None:
timestamp=str(time.time()),
currency=currmap[envname],
curr_path=os.environ["PATH"],
- coverage=1 if envname=="coverage" else 0
-
+ coverage=1 if envname == "coverage" else 0,
)
)
@@ -537,13 +550,18 @@ def bootstrap() -> None:
elif envname == "coverage":
create_bb_worker("bb-worker", "lcov-worker", "lcov-pass")
- www_path = (Path.home() / "www")
+ www_path = Path.home() / "www"
www_path.mkdir(exist_ok=True)
if not os.path.islink(www_path / "merchant"):
- os.symlink(Path.home() / "sources" / "merchant" /
"coverage_report", www_path / "merchant")
+ os.symlink(
+ Path.home() / "sources" / "merchant" / "coverage_report",
+ www_path / "merchant",
+ )
if not os.path.islink(www_path / "exchange"):
- os.symlink(Path.home() / "sources" / "exchange" /
"coverage_report", www_path / "exchange")
-
+ os.symlink(
+ Path.home() / "sources" / "exchange" / "coverage_report",
+ www_path / "exchange",
+ )
print("Bootstrap finished.")
print("Please source the ~/activate file before proceeding.")
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: sync repos,
gnunet <=