Update Jenkinsfile
This commit is contained in:
parent
5908812d45
commit
f8bdfeb03d
1 changed files with 15 additions and 4 deletions
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
@ -54,10 +54,21 @@ pipeline {
|
|||
#!/bin/bash
|
||||
|
||||
cd patches
|
||||
for i in *.patch; do
|
||||
echo "Applying patch: $i"
|
||||
patch -Np1 -i "$i" -d ../phoenix-firestorm/
|
||||
# Enable nullglob so the pattern returns an empty list if no matches are found
|
||||
shopt -s nullglob
|
||||
patch_files=(*.patch)
|
||||
|
||||
# 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