busbey commented on a change in pull request #1725: URL: https://github.com/apache/hbase/pull/1725#discussion_r429419909
########## File path: dev-support/create-release/do-release-docker.sh ########## @@ -168,11 +172,65 @@ if [ -n "$JAVA" ]; then JAVA_VOL=(--volume "$JAVA:/opt/hbase-java") fi +#TODO some debug output would be good here +GIT_REPO_MOUNT=() +if [ -n "${GIT_REPO}" ]; then + case "${GIT_REPO}" in + # skip the easy to identify remote protocols + ssh://*|git://*|http://*|https://*|ftp://*|ftps://*) ;; + # for sure local + /*) + GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO},dst=/opt/hbase-repo") + echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}" + GIT_REPO="/opt/hbase-repo" + ;; + # on the host but normally git wouldn't use the local optimization + file://*) + echo "[INFO] converted file:// git repo to a local path, which changes git to assume --local." + GIT_REPO_MOUNT=(--mount "type=bind,src=${GIT_REPO#file://},dst=/opt/hbase-repo") + echo "HOST_GIT_REPO=${GIT_REPO}" >> "${ENVFILE}" + GIT_REPO="/opt/hbase-repo" + ;; + # have to decide if it's a local path or the "scp-ish" remote + *) Review comment: unfortunately git supports a repo path that looks like an scp remote file path that doesn't fit that pattern. which means if it does not match we still have to do the wonky "is this local or scp" business. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org