You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by GitBox <gi...@apache.org> on 2020/09/28 19:31:32 UTC

[GitHub] [yetus] ndimiduk commented on a change in pull request #138: YETUS-966. github actions very confused about tags?

ndimiduk commented on a change in pull request #138:
URL: https://github.com/apache/yetus/pull/138#discussion_r496178728



##########
File path: precommit/src/main/shell/test-patch.sh
##########
@@ -1288,14 +1288,19 @@ function git_checkout
       # protected by OFFLINE == false
 
       if [[ "${GIT_OFFLINE}" == false ]]; then
-        if ! "${GIT}" fetch; then
-          yetus_error "ERROR: git fetch is failing"
-          cleanup_and_exit 1
-        fi
 
-        if ! "${GIT}" reset --hard FETCH_HEAD; then
-          yetus_error "ERROR: git reset is failing"
-          cleanup_and_exit 1
+        # if it is a tag, then the pull rebase should have done

Review comment:
       _nod_

##########
File path: precommit/src/main/shell/test-patch.sh
##########
@@ -1288,14 +1288,19 @@ function git_checkout
       # protected by OFFLINE == false
 
       if [[ "${GIT_OFFLINE}" == false ]]; then
-        if ! "${GIT}" fetch; then
-          yetus_error "ERROR: git fetch is failing"
-          cleanup_and_exit 1
-        fi
 
-        if ! "${GIT}" reset --hard FETCH_HEAD; then
-          yetus_error "ERROR: git reset is failing"
-          cleanup_and_exit 1
+        # if it is a tag, then the pull rebase should have done
+        # the trick already
+        if [[ ! -f ".git/refs/tags/${PATCH_BRANCH}" ]]; then

Review comment:
       `PATCH_BRANCH` not being a tag -- this should be the common case, correct? I'm trying to imagine when/why someone would build a tag instead of a branch. Is ghaction invoked against anything other than a PR? I suppose one _could_ create a PR from a tag.




----------------------------------------------------------------
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:
users@infra.apache.org