Skip to content

Commit

Permalink
changed so setup only sets up paperspigot so we can cache that and pa…
Browse files Browse the repository at this point in the history
…nda patch on applies pandapaper
  • Loading branch information
mechoriet committed Apr 15, 2023
1 parent 8b7d515 commit 22de75d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/base
key: cache-paper-base-${{ github.ref_name }}
key: cache-paper-base
- if: ${{ steps.cache-base.outputs.cache-hit != 'true' }}
name: Setup build environment
run: ./panda setup
Expand Down
23 changes: 13 additions & 10 deletions scripts/applyPatches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,21 @@ if [ "$2" == "--setup" ] || [ "$2" == "--jar" ]; then
echo "Importing MC Dev"

./scripts/importmcdev.sh "$basedir" || exit 1
if [ "$2" == "--setup" ]; then
exit 1
fi
elif [ ! -d "base/Paper/PaperSpigot-Server" ]; then
echo "Upstream directory does not exist. Did you forget to run 'panda setup'?"
exit 1
else
# Apply PandaSpigot
(
applyPatch "base/Paper/PaperSpigot-API" PandaSpigot-API HEAD patches/api &&
applyPatch "base/Paper/PaperSpigot-Server" PandaSpigot-Server HEAD patches/server
cd "$basedir"
) || (
echo "Failed to apply Paper Patches"
exit 1
) || exit 1
fi

# Apply PandaSpigot
(
applyPatch "base/Paper/PaperSpigot-API" PandaSpigot-API HEAD patches/api &&
applyPatch "base/Paper/PaperSpigot-Server" PandaSpigot-Server HEAD patches/server
cd "$basedir"
) || (
echo "Failed to apply Paper Patches"
exit 1
) || exit 1
) || exit 1
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [ "$2" == "--setup" ] || [ "$2" == "--jar" ]; then
./scripts/decompile.sh "$basedir"
./scripts/init.sh "$basedir"
fi
./scripts/applyPatches.sh "$basedir" "$2"

if [ "$2" == "--jar" ]; then
./gradlew build && ./scripts/paperclip.sh "$basedir"
Expand Down

0 comments on commit 22de75d

Please sign in to comment.