Skip to content

Commit 5f2c6b8

Browse files
committed
Temp fix rev parse error
1 parent 8ffa241 commit 5f2c6b8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

autopreview.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ set -ev
66

77
if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then #to make sure it only runs on PRs and not all merges
88
USERNAME=${TRAVIS_PULL_REQUEST_SLUG::-15}
9-
COMMIT_HASH="$(git rev-parse @~)"
10-
mapfile -t FILES_CHANGED < <(git diff --name-only "$COMMIT_HASH")
9+
# COMMIT_HASH="$(git rev-parse @~)"
10+
# mapfile -t FILES_CHANGED < <(git diff --name-only "$COMMIT_HASH")
1111

1212
if [ "${TRAVIS_PULL_REQUEST_BRANCH}" != "main" ] ; then # to make sure it does not run for direct main changes
13-
if [[ " ${FILES_CHANGED[*]} " = *".adoc"* ]] || [[ " ${FILES_CHANGED[*]} " = *"_topic_map.yml"* ]] || [[ " ${FILES_CHANGED[*]} " = *"_distro_map.yml"* ]] ; then # to make sure this doesn't run for general modifications
13+
# if [[ " ${FILES_CHANGED[*]} " = *".adoc"* ]] || [[ " ${FILES_CHANGED[*]} " = *"_topic_map.yml"* ]] || [[ " ${FILES_CHANGED[*]} " = *"_distro_map.yml"* ]] ; then # to make sure this doesn't run for general modifications
1414
if [ "$USERNAME" != "openshift-cherrypick-robot" ] ; then # to make sure it doesn't run for USERNAME openshift-cherrypick-robot
1515
echo "{\"PR_BRANCH\":\"${TRAVIS_PULL_REQUEST_BRANCH}\",\"BASE_REPO\":\"${TRAVIS_REPO_SLUG}\",\"PR_NUMBER\":\"${TRAVIS_PULL_REQUEST}\",\"USER_NAME\":\"${USERNAME}\",\"BASE_REF\":\"${TRAVIS_BRANCH}\",\"REPO_NAME\":\"${TRAVIS_PULL_REQUEST_SLUG}\",\"SHA\":\"${TRAVIS_PULL_REQUEST_SHA}\"}" > buildset.json
1616

@@ -20,9 +20,9 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ] ; then #to make sure it only runs on PR
2020
else
2121
echo -e "\\n\\033[0;32m[✓] Skipping preview build for openshift-cherrypick-robot.\\033[0m"
2222
fi
23-
else
24-
echo -e "\\n\\033[1;33m[!] No .adoc files modified, not building a preview.\\033[0m"
25-
fi
23+
# else
24+
# echo -e "\\n\\033[1;33m[!] No .adoc files modified, not building a preview.\\033[0m"
25+
# fi
2626
else
2727
echo -e "\\n\\033[1;33m[!] Direct PR for main branch, not building a preview.\\033[0m"
2828
fi

0 commit comments

Comments
 (0)