Update Jenkinsfile
This commit is contained in:
parent
5908812d45
commit
f8bdfeb03d
1 changed files with 15 additions and 4 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -54,10 +54,21 @@ pipeline {
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd patches
|
cd patches
|
||||||
for i in *.patch; do
|
# Enable nullglob so the pattern returns an empty list if no matches are found
|
||||||
echo "Applying patch: $i"
|
shopt -s nullglob
|
||||||
patch -Np1 -i "$i" -d ../phoenix-firestorm/
|
patch_files=(*.patch)
|
||||||
done
|
|
||||||
|
# Only proceed if there are patch files
|
||||||
|
if [ ${#patch_files[@]} -ne 0 ]; then
|
||||||
|
# Loop over all patch files and apply them
|
||||||
|
for patch_file in "${patch_files[@]}"; do
|
||||||
|
echo "Applying $patch_file to ../phoenix-firestorm/"
|
||||||
|
patch -d ../phoenix-firestorm/ -Np1 -i "$patch_file"
|
||||||
|
done
|
||||||
|
echo "All patches applied."
|
||||||
|
else
|
||||||
|
echo "No patch files found."
|
||||||
|
fi
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue