lib/minke/scripts/minke in minke-1.13.4 vs lib/minke/scripts/minke in minke-1.13.5
- old
+ new
@@ -1,7 +1,7 @@
#!/bin/bash
-MINKE_VERSION="1.13.4"
+MINKE_VERSION="1.13.5"
ERROR="Please specify a command e.g. ./minke build"
DOCKER_SOCK="/var/run/docker.sock:/var/run/docker.sock"
NEW_UUID=$(base64 /dev/urandom | tr -d '/+' | head -c 32 | tr '[:upper:]' '[:lower:]')
@@ -29,21 +29,22 @@
COMMAND=$*
# Test if interactive terminal and set the flag
[[ -t 1 ]] && IT="-it" || IT=""
-if [[ $1 == "generate" ]] || [[ $2 == "generate" ]]; then
+if [[ $1 == \generate* ]]; then
echo "Generating new template"
DIR=${PWD}
DOCKER_RUN="docker run --rm -v ${DOCKER_SOCK} -v ${DIR}:${DIR} -v ${DIR}/_build/vendor/gems:${GEMSETFOLDER} -e DOCKER_NETWORK=minke_${NEW_UUID} -w ${DIR} ${DOCKER_IMAGE} /bin/bash -c '${RVM_COMMAND} && bundle install && minke ${COMMAND}'"
+
eval "${DOCKER_RUN}"
fi
-if [[ $1 != "generate" ]] || [[ $2 != "generate" ]]; then
+if [[ $1 != \generate* ]]; then
DIR=$(dirname `pwd`)
DOCKER_RUN="docker run --rm ${IT} --net=minke_${NEW_UUID} -v ${DOCKER_SOCK} -v ${DIR}:${DIR} -v ${DIR}/_build/vendor/gems:${GEMSETFOLDER} -e DOCKER_NETWORK=minke_${NEW_UUID} -w ${DIR}/_build ${DOCKER_IMAGE} /bin/bash -c '${RVM_COMMAND} && minke ${COMMAND}'"
- echo "Running command: minke ${COMMAND}"
+ echo "Running command: ${COMMAND}"
eval "docker network create minke_${NEW_UUID}"
eval "${DOCKER_RUN}"
eval "docker network rm minke_${NEW_UUID}"
fi
\ No newline at end of file