gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: Define docker-file path from s


From: gnunet
Subject: [taler-deployment] branch master updated: Define docker-file path from script location.
Date: Mon, 21 Nov 2022 15:27:56 +0100

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 050bab1  Define docker-file path from script location.
050bab1 is described below

commit 050bab12ada63672d11c8f5fdc67ef9abde7b27d
Author: MS <ms@taler.net>
AuthorDate: Mon Nov 21 15:17:33 2022 +0100

    Define docker-file path from script location.
---
 docker/demo/README        | 11 +----------
 docker/demo/build_base.sh | 27 +++++++++++++--------------
 2 files changed, 14 insertions(+), 24 deletions(-)

diff --git a/docker/demo/README b/docker/demo/README
index 15f5041..dc329a8 100644
--- a/docker/demo/README
+++ b/docker/demo/README
@@ -25,16 +25,7 @@ with ALL the Taler software and its dependencies.
 
 From this directory, run:
 
-  # Without arguments, it prints the help message.
-  $ ./build_base.sh $docker-file [tags-file]
-
-tags-file is a bash source having environment variable
-definitions to specify which tags should be pulled for
-some of the components.  The following tags can be given:
-TAG_LIBMHD, TAG_GNUNET, TAG_EXCHANGE, TAG_MERCHANT,
-TAG_WALLET, TAG_LIBEUFIN, TAG_MERCHANT_DEMOS, TAG_SYNC.
-If tags-file is missing, all the code will be pulled
-to master's HEAD.
+  $ ./build_base.sh [--help] [tags-file]
 
 Composed containers
 -------------------
diff --git a/docker/demo/build_base.sh b/docker/demo/build_base.sh
index eb074a6..b9ddc61 100755
--- a/docker/demo/build_base.sh
+++ b/docker/demo/build_base.sh
@@ -5,12 +5,16 @@
 set -e
 
 usage () {
-  echo Usage: ./build_base.sh [-h,  --help] docker-file [tags-file]
+  echo Usage: ./build_base.sh [-h,  --help] [tags-file]
   echo
   echo Builds the taler_local/taler_base base image, optionally
   echo using the 'tags-file', a text file containing environment
   echo variables definitions to specify to which Git tag each Taler
-  echo component should be pulled.
+  echo component should be pulled.  The following tags exist:
+  echo TAG_LIBMHD, TAG_GNUNET, TAG_EXCHANGE, TAG_MERCHANT,
+  echo TAG_WALLET, TAG_LIBEUFIN, TAG_MERCHANT_DEMOS, TAG_SYNC.
+  echo If tags-file is missing, all the code will be pulled
+  echo from master\'s HEAD.
 }
 
 for helpOpt in "-h" "--help"; do
@@ -24,14 +28,7 @@ if ! which realpath > /dev/null; then
   echo "Please, install 'realpath' (coreutils)"
 fi
 
-# Help message not returned, assume the first
-# argument is the Dockerfile.
-if test -z "$1"; then
-  echo docker-file argument not found.
-  exit 1
-fi
-
-DOCKER_FILE=$(realpath $1)
+DOCKER_FILE="$(dirname $(realpath $BASH_SOURCE))/images/base/Dockerfile"
 
 # Check base file.
 if ! test -a $DOCKER_FILE; then
@@ -44,10 +41,12 @@ fi
 # case where the tag file is not given.
 export DOCKER_BUILDKIT=1
 
-if test -n "$2"; then
-  ! test -a "$2" && (echo "Tag file: $2 not found." && exit 1) 
-  TAGS_FILE_DIR=$(dirname $2)
-  TAGS_FILE_NAME=$(basename $2)
+
+# --help option not found in $1, check for the tags-file.
+if test -n "$1"; then
+  ! test -a "$1" && (echo "Tag file: $1 not found." && exit 1) 
+  TAGS_FILE_DIR=$(dirname $1)
+  TAGS_FILE_NAME=$(basename $1)
   cd $TAGS_FILE_DIR
   docker build --no-cache --force-rm \
     -t taler_local/taler_base \

-- 
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]