Merge "Remove */spec/* from puppet patches" into stable/wallaby

This commit is contained in:
Zuul 2023-09-15 20:26:32 +00:00 committed by Gerrit Code Review
commit 4ebd1d38a8
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ function apply_patch {
curl -4sSL --retry 10 ${gerrit_url}/changes/${patch_id}/revisions/${patch_revision}/patch?download | \
base64 -d > ${temp_dir}/patch.txt
if filterdiff -x "*/tests/*" < ${temp_dir}/patch.txt | sudo patch --dry-run --force -d ${patch_dir} -p${patch_strip} 2>&1
if filterdiff -x "*/tests/*" -x "*/spec/*" < ${temp_dir}/patch.txt | sudo patch --dry-run --force -d ${patch_dir} -p${patch_strip} 2>&1
then
filterdiff -x "*/tests/*" < ${temp_dir}/patch.txt | sudo patch -Ns -d ${patch_dir} -p${patch_strip}
filterdiff -x "*/tests/*" -x "*/spec/*" < ${temp_dir}/patch.txt | sudo patch -Ns -d ${patch_dir} -p${patch_strip}
else
echo "Patch ${patch_id} fails to apply - either already applied or you need to fix it."
fi