[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-deployment] branch master updated: build subcommand
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-deployment] branch master updated: build subcommand |
Date: |
Thu, 10 Oct 2019 20:57:55 +0200 |
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 3f8dccd build subcommand
3f8dccd is described below
commit 3f8dccd9dd97ee03624ddcf62260a949d22cec26
Author: Florian Dold <address@hidden>
AuthorDate: Fri Oct 11 00:27:40 2019 +0530
build subcommand
---
bin/taler-deployment | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/bin/taler-deployment b/bin/taler-deployment
index 659215d..4c3ad42 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -3,6 +3,7 @@
import click
import types
import os
+import sys
import os.path
import subprocess
import time
@@ -21,7 +22,7 @@ function taler-exchange-keyup () {{
echo "Command disabled. Please use taler-deployment-keyup instead."
}}
-export PATH="$HOME/deployment/bin:$HOME/local/bin:\$PATH"
+export PATH="$HOME/deployment/bin:$HOME/local/bin:{curr_path}"
export TALER_BOOTSTRAP_TIMESTAMP={timestamp}
export TALER_CHECKDB="postgres:///talercheck-$USER"
export TALER_CONFIG_CURRENCY={currency}
@@ -45,6 +46,36 @@ def cli():
currmap = {"test": "TESTKUDOS", "demo": "KUDOS", "int": "INTKUDOS"}
+def ensure_activated():
+ """Make sure that the environment variables have been
+ loaded correctly via the ~/activate script"""
+ ts = os.environ.get("TALER_BOOTSTRAP_TIMESTAMP")
+ if ts is None:
+ print("Please do 'source ~/.activate' first.", file=sys.stderr)
+ sys.exit(1)
+ out = subprocess.check_output(
+ ["bash", "-c", "source ~/activate; echo $TALER_BOOTSTRAP_TIMESTAMP"]
+ )
+ out = out.strip(" \n")
+ if out != ts:
+ print(
+ f"Please do 'source ~/.activate'. Current ts={ts}, new ts={out}",
+ file=sys.stderr,
+ )
+ sys.exit(1)
+
+
+@cli.command
+def build():
+ """Build the deployment from source."""
+ ensure_activated()
+ os.chdir((Path.home() / "deployment" / "taler-build").as_posix())
+ subprocess.run(["./invalidate.sh"], check=True)
+ subenv = os.environ.copy()
+ subenv["GNUNET_FORCE_LOG"] =
"util;;;;WARNING/taler;;;;DEBUG/twister;;;;DEBUG/test;;;;DEBUG"
+ subprocess.run(["make"], check=True, env=subenv)
+
+
@cli.command()
@click.argument("envname", type=click.Choice(["test", "int", "demo"]))
def bootstrap(envname):
@@ -90,7 +121,10 @@ def bootstrap(envname):
with (home / "activate").open("w") as f:
f.write(
activate_template.format(
- envname=envname, timestamp=str(time.time()),
currency=currmap[envname]
+ envname=envname,
+ timestamp=str(time.time()),
+ currency=currmap[envname],
+ curr_path=os.environ["PATH"],
)
)
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [taler-deployment] branch master updated: build subcommand,
gnunet <=