Merge "forcing rpm-check if files added to the commit"
authorMichael Chapman <michapma@redhat.com>
Fri, 8 Jul 2016 02:20:55 +0000 (02:20 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Fri, 8 Jul 2016 02:20:55 +0000 (02:20 +0000)
ci/build.sh

index fd079c9..af065b1 100755 (executable)
@@ -112,10 +112,10 @@ fi
 
 # Conditionally execute RPM build checks if the specs change and target is not rpm or iso
 if [[ "$MAKE_TARGETS" == "images" ]]; then
-    commit_file_list=$(git show --pretty="format:" --name-only)
+    commit_file_list=$(git show --pretty="format:" --name-status)
     if git show -s | grep "force-build-rpms"; then
         MAKE_TARGETS+=" rpms"
-    elif [[ $commit_file_list == *build/Makefile* ]]; then
+    elif [[ $commit_file_list == *"A$(printf '\t')"* || $commit_file_list == *build/Makefile* ]]; then
         # Makefile forces all rpms to be checked
         MAKE_TARGETS+=" rpms-check"
     else