This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git


The following commit(s) were added to refs/heads/master by this push:
     new 6305c52  tools/docker: Change directory to docker.sh's directory (#916)
6305c52 is described below

commit 6305c5227ca1b04a590e7fb89243663c69197a42
Author: Wido den Hollander <[email protected]>
AuthorDate: Wed Jan 13 16:39:25 2021 +0100

    tools/docker: Change directory to docker.sh's directory (#916)
    
    By switching to this directory we can use relative paths regardless
    of how people execute the script.
    
    cd tools
    ./docker.sh
    
    OR
    
    ./tools/docker.sh
    
    OR
    
    /path/to/git-repo/tools/docker.sh
---
 tools/docker.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/docker.sh b/tools/docker.sh
index 21406b6..6b8ecdb 100755
--- a/tools/docker.sh
+++ b/tools/docker.sh
@@ -19,6 +19,8 @@
 set -e
 set -x
 
+cd $(dirname $0)
+
 GIT_TAG="$(git tag --points-at | head -n 1)"
 if [ -n "${GIT_REV}" ]; then
        LABEL_GIT_TAG="--label \"org.opencontainers.image.version=${GIT_TAG}\""

Reply via email to