gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-deployment] branch master updated: merging reserve t


From: gnunet
Subject: [GNUnet-SVN] [taler-deployment] branch master updated: merging reserve topping in one script
Date: Thu, 30 Nov 2017 17:02:40 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new 8749671  merging reserve topping in one script
8749671 is described below

commit 8749671e927a2483019a39372e1167d66a330421
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Nov 30 16:43:22 2017 +0100

    merging reserve topping in one script
---
 bin/taler-deployment-enable-reserve | 17 -----------------
 bin/taler-deployment-top-reserve    | 17 +++++++++++++++--
 buildbot/top_reserve.sh             |  2 +-
 3 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/bin/taler-deployment-enable-reserve 
b/bin/taler-deployment-enable-reserve
deleted file mode 100755
index 2404a0c..0000000
--- a/bin/taler-deployment-enable-reserve
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-# This file is run only ONCE - and acts more like a recipe!
-# That's because a reserve cannot get its deadline changed,
-# so even though we top periodically the same reserve (with
-# taler-exchange-reservemod), we can't likewise move in the
-# future that reserve's expiration date; thus we pick a very
-# distant time for it.
-
-source $HOME/activate
-
-taler-merchant-tip-enable \
-  --amount="$TALER_CONFIG_CURRENCY:100.00" \
-  --backend-uri="http://backend.$TALER_ENVNAME.taler.net/"; \
-  --credit-uuid=ZUV321 \ # do not change
-  --instance=default \
-  --expiration=2020-12-31
diff --git a/bin/taler-deployment-top-reserve b/bin/taler-deployment-top-reserve
index 33d1fd6..b5984a2 100755
--- a/bin/taler-deployment-top-reserve
+++ b/bin/taler-deployment-top-reserve
@@ -1,12 +1,25 @@
 #!/bin/bash
 
-source $HOME/activate
+if test -z $TALER_ENVNAME || test -z $TALER_CONFIG_CURRENCY; then
+  echo "Please source ~/activate"
+  exit 1
+fi
+
+# %N is current nanoseconds.
+UUID=$(date +"uuid-%N")
 
 taler-exchange-reservemod \
   --add="$TALER_CONFIG_CURRENCY:100.0" \
   --reserve=S98FEXHW3VJ93EA73CRAQ5E8E4DJE96Z9JXYFHFD169FWS9NS8A0 \
   
--sender='{"bank_uri":"https://bank.$TALER_ENVNAME.taler.net/","account_number":7,"type":"test"}'
 \
-  --transfer='ZUV321'
+  --transfer=$UUID
 
 # note: account number (7) is hardcoded, as tipping
 # is only being tested against the 'default' instance.
+
+taler-merchant-tip-enable \
+  --amount="$TALER_CONFIG_CURRENCY:100.00" \
+  --backend-uri="http://backend.$TALER_ENVNAME.taler.net/"; \
+  --credit-uuid=$UUID \
+  --instance=default \
+  --expiration=$(date --date="2 weeks" +"%Y-%m-%d")
diff --git a/buildbot/top_reserve.sh b/buildbot/top_reserve.sh
index 60e27b0..2b0802b 100755
--- a/buildbot/top_reserve.sh
+++ b/buildbot/top_reserve.sh
@@ -2,4 +2,4 @@
 
 active=$(sudo -u test cat /home/test/active)
 
-sudo -u $active bash -c 'taler-deployment-top-reserve'
+sudo -u $active bash -c 'source $HOME/activate; taler-deployment-top-reserve'

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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