busbey commented on a change in pull request #1725:
URL: https://github.com/apache/hbase/pull/1725#discussion_r429420672



##########
File path: dev-support/create-release/release-util.sh
##########
@@ -389,6 +389,40 @@ function configure_maven {
 EOF
 }
 
+# force a clone of the repo, optionally with auth details for pushing.
+function git_force_clone {
+  local asf_repo
+  if [ -d "${PROJECT}" ]; then
+    rm -rf "${PROJECT}"
+  fi
+
+  if [[ -z "${GIT_REPO}" ]]; then
+    asf_repo="gitbox.apache.org/repos/asf/${PROJECT}.git"
+    echo "[INFO] clone will be of the gitbox repo for ${PROJECT}."
+    if [ -n "${ASF_USERNAME}" ] && [ -n "${ASF_PASSWORD}" ]; then
+      # Ugly!
+      encoded_username=$(python -c "import urllib; print 
urllib.quote('''$ASF_USERNAME''')")
+      encoded_password=$(python -c "import urllib; print 
urllib.quote('''$ASF_PASSWORD''')")
+      GIT_REPO="https://$encoded_username:$encoded_password@${asf_repo}";
+    else
+      GIT_REPO="https://${asf_repo}";
+    fi
+  else
+    echo "[INFO] clone will be of provided git repo."
+  fi
+  # N.B. we use the shared flag because the clone is short lived and if a 
local repo repo was

Review comment:
       the literal meaning is "Nota Bene" but in english it just means "hey pay 
attention to this"




----------------------------------------------------------------
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:
[email protected]


Reply via email to