[CI-SKIP] Avoid rebuilding Paper-Server if Paper-API did not apply
This scenario occurs when Paper-API fails, we then rebuild the patches, however Paper-Server was left un an outdated state since the most recent patches did not get applied to it. This results in us reverting Paper-Server to an older state. If Paper-API fails to apply, then Paper-Server has to be considered dirty. This should avoid us having accidental patch reversions
This commit is contained in:
parent
f8ecb526e7
commit
668ad2cf0b
2 changed files with 12 additions and 1 deletions
|
@ -37,6 +37,8 @@ function applyPatch {
|
|||
|
||||
echo " Applying patches to $target..."
|
||||
|
||||
statusfile=".git/patch-apply-failed"
|
||||
rm -f "$statusfile"
|
||||
$gitcmd am --abort >/dev/null 2>&1
|
||||
|
||||
# Special case Windows handling because of ARG_MAX constraint
|
||||
|
@ -48,6 +50,7 @@ function applyPatch {
|
|||
fi
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo 1 > "$statusfile"
|
||||
echo " Something did not apply cleanly to $target."
|
||||
echo " Please review above details and finish the apply then"
|
||||
echo " save the changes with rebuildPatches.sh"
|
||||
|
@ -64,6 +67,7 @@ function applyPatch {
|
|||
|
||||
exit 1
|
||||
else
|
||||
rm -f "$statusfile"
|
||||
echo " Patches applied cleanly to $target"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue