allow generated changes in readonly package
This commit is contained in:
parent
a264e5f885
commit
98acd800da
@ -413,11 +413,11 @@ kube::util::has_changes_against_upstream_branch() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# notice this uses ... to find the first shared ancestor
|
# notice this uses ... to find the first shared ancestor
|
||||||
if git diff --name-only "${full_branch}...HEAD" | grep -v "${not_pattern}" | grep "${pattern}" > /dev/null; then
|
if git diff --name-only "${full_branch}...HEAD" | grep -v -E "${not_pattern}" | grep "${pattern}" > /dev/null; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
# also check for pending changes
|
# also check for pending changes
|
||||||
if git status --porcelain | grep -v "${not_pattern}" | grep "${pattern}" > /dev/null; then
|
if git status --porcelain | grep -v -E "${not_pattern}" | grep "${pattern}" > /dev/null; then
|
||||||
echo "Detected '${pattern}' uncommitted changes."
|
echo "Detected '${pattern}' uncommitted changes."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -45,7 +45,7 @@ find_files() {
|
|||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
conflicts=($(find_files | sed 's|/.readonly||' | while read dir; do
|
conflicts=($(find_files | sed 's|/.readonly||' | while read dir; do
|
||||||
dir=${dir#./}
|
dir=${dir#./}
|
||||||
if kube::util::has_changes_against_upstream_branch "${branch}" "^${dir}/[^/]*\$" "/.readonly\$" &>/dev/null; then
|
if kube::util::has_changes_against_upstream_branch "${branch}" "^${dir}/[^/]*\$" "/.readonly\$|/BUILD$|/zz_generated" &>/dev/null; then
|
||||||
echo "${dir}"
|
echo "${dir}"
|
||||||
fi
|
fi
|
||||||
done))
|
done))
|
||||||
|
Loading…
Reference in New Issue
Block a user