gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: prepare script: DB-reset is op


From: gnunet
Subject: [taler-deployment] branch master updated: prepare script: DB-reset is optional
Date: Wed, 25 Aug 2021 11:25:17 +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 695a517  prepare script: DB-reset is optional
695a517 is described below

commit 695a517a2d20e85da64f02ab9604b2fff74b526e
Author: MS <ms@taler.net>
AuthorDate: Tue Aug 24 22:25:13 2021 -1100

    prepare script: DB-reset is optional
---
 bin/taler-deployment-prepare | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/bin/taler-deployment-prepare b/bin/taler-deployment-prepare
index 347b671..f900eed 100755
--- a/bin/taler-deployment-prepare
+++ b/bin/taler-deployment-prepare
@@ -11,6 +11,15 @@ set -eu
 
 source "$HOME/activate"
 
+# $1 = {yes,no} indicates WITH_DB_RESET.  Defaults to no.
+# Helps avoiding color Y destroying the DB while color X is in
+# production.
+WITH_DB_RESET=no
+
+if test $1 = yes; then
+  WITH_DB_RESET=yes
+fi
+
 if [[ -z ${TALER_ENV_NAME+x} ]]; then
   echo "TALER_ENV_NAME not set"
   exit 1
@@ -51,7 +60,9 @@ esac
 ## Step 1b: initialize database
 ##
 
-taler-exchange-dbinit --reset
+if test $WITH_DB_RESET = yes; then
+  taler-exchange-dbinit --reset
+fi
 
 ##
 ## Step 2: Copy key material and update denom keys
@@ -149,7 +160,9 @@ sleep 5
 ##
 
 # Delete existing data from bank.
-echo "yes" | taler-bank-manage django flush
+if test $WITH_DB_RESET = yes; then
+  echo "yes" | taler-bank-manage django flush
+fi
 
 case $TALER_ENV_NAME in
   demo|test|int|local|tanker)
@@ -184,7 +197,9 @@ esac
 ## Step 6: Set up merchant
 ##
 
-taler-merchant-dbinit --reset
+if test $WITH_DB_RESET = yes; then
+  taler-merchant-dbinit --reset
+fi
 
 # Making sure ARM is not running yet.
 taler-deployment-arm -e

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]