keith-turner commented on a change in pull request #197:
URL: https://github.com/apache/fluo-website/pull/197#discussion_r486325253



##########
File path: _scripts/publish.sh
##########
@@ -0,0 +1,36 @@
+#! /usr/bin/env bash
+
+# catch most errors
+set -eE
+trap 'echo "[ERROR] Error occurred at $BASH_SOURCE:$LINENO command: 
$BASH_COMMAND"' ERR
+
+function publish_main() {
+  local src='asf-staging' dst='asf-site' r yn remotes=()
+  for r in $(git remote); do
+    remotes+=("$r ($(git config "remote.$r.url"))")
+  done
+  echo 'Select a remote:'
+  select r in "${remotes[@]}"; do

Review comment:
       I did not know about select, that is neat.

##########
File path: _scripts/publish.sh
##########
@@ -0,0 +1,36 @@
+#! /usr/bin/env bash
+
+# catch most errors
+set -eE
+trap 'echo "[ERROR] Error occurred at $BASH_SOURCE:$LINENO command: 
$BASH_COMMAND"' ERR
+
+function publish_main() {
+  local src='asf-staging' dst='asf-site' r yn remotes=()
+  for r in $(git remote); do
+    remotes+=("$r ($(git config "remote.$r.url"))")
+  done
+  echo 'Select a remote:'
+  select r in "${remotes[@]}"; do
+    if [[ -n $r ]]; then
+      r="${r%% *}"
+      git remote update --prune "${r:?}"
+      echo 'Updating would perform the following (if anything):'
+      git push --dry-run "$r" "$r/$src:refs/heads/$dst"
+      if [[ "$(git rev-parse "remotes/$r/$src")" == "$(git rev-parse 
"remotes/$r/$dst")" ]]; then

Review comment:
       Is this checking if the commit hashes are the same for the two remotes?




----------------------------------------------------------------
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


Reply via email to