Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379304 )

Change subject: dockerfiles: use a subshell instead of pushd/popd
......................................................................

dockerfiles: use a subshell instead of pushd/popd

They confuse me, seems easier and nicer to:

(cd foo
  ...
)

Change-Id: I8662369fff19050971db996d2fb66f9ede3c2126
---
M dockerfiles/build.sh
1 file changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/04/379304/1

diff --git a/dockerfiles/build.sh b/dockerfiles/build.sh
index 1800101..04426c9 100755
--- a/dockerfiles/build.sh
+++ b/dockerfiles/build.sh
@@ -19,20 +19,21 @@
     IMG="${DOCKER_HUB_ACCOUNT}/${DOCKERFILE_NAME}"
     TAGGED_IMG="${IMG}:${DOCKER_TAG_DATE}"
 
-    pushd "$DOCKERFILE_DIR" &>/dev/null
-    info "BUILDING $TAGGED_IMG"
+    (
+               cd "$DOCKERFILE_DIR"
+               info "BUILDING $TAGGED_IMG"
 
-    if [ -x "./prebuild.sh" ]; then
-        ./prebuild.sh
-    fi
+               if [ -x "./prebuild.sh" ]; then
+                       ./prebuild.sh
+               fi
 
-    docker build \
-        -t "${TAGGED_IMG}" \
-        -f "Dockerfile" .
+               docker build \
+                       -t "${TAGGED_IMG}" \
+                       -f "Dockerfile" .
 
-    docker tag "${TAGGED_IMG}" "${IMG}:latest"
+               docker tag "${TAGGED_IMG}" "${IMG}:latest"
+       )
 
-    popd &>/dev/null
 }
 
 BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

-- 
To view, visit https://gerrit.wikimedia.org/r/379304
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8662369fff19050971db996d2fb66f9ede3c2126
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to