[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: let bootstrap create the token
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: let bootstrap create the token file |
Date: |
Mon, 17 May 2021 20:15:07 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 35c517e let bootstrap create the token file
35c517e is described below
commit 35c517e6ab2b421a652371a8aa212111067d1f5b
Author: MS <ms@taler.net>
AuthorDate: Mon May 17 20:15:04 2021 +0200
let bootstrap create the token file
---
bin/taler-deployment | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/bin/taler-deployment b/bin/taler-deployment
index ee658d6..e3ce6bb 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -57,6 +57,7 @@ export TALER_COVERAGE={coverage}
export TALER_ENV_FRONTENDS_APITOKEN="$(cat ~/merchant_auth_token)"
"""
+TOKEN_FILE = "~/merchant_auth_token"
@dataclass
class Repo:
@@ -100,6 +101,8 @@ currmap = {
"tanker": "SEK"
}
+def generate_apitoken():
+ return "secret-token:" + ''.join(random.choices(ascii_letters +
ascii_uppercase, k=10))
def update_checkout(r: Repo, p: Path):
"""Clean the repository's working directory and
@@ -685,10 +688,11 @@ def bootstrap() -> None:
path_list.insert(0, local_path)
if deployment_path not in path_list:
path_list.insert(0, deployment_path)
- apitoken = load_apitoken()
- if not apitoken:
- print("Please create ~/merchant_auth_token
(taler-deployment-auth-token can help).")
- return 1
+
+ if not os.path.isfile(TOKEN_FILE):
+ with open(TOKEN_FILE) as f:
+ f.write(generate_apitoken())
+
with (home / "activate").open("w") as f:
f.write(
activate_template.format(
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: let bootstrap create the token file,
gnunet <=