From ddc4f72384c52694962889efff869270fc3a21a7 Mon Sep 17 00:00:00 2001 From: Kas-tle <26531652+Kas-tle@users.noreply.github.com> Date: Mon, 26 Apr 2021 19:37:20 -0700 Subject: [PATCH] Feature/build-script (#11) * Comment build script and one-line all JSON files * Add note to readme for building w/o one-lining, and update implements * Resolve merge conflict and update build script - Resolve merge conflict - Edit Jenkinsfile with new script arguments - Default build script to not apply whitespace removal (use -jc to apply it) * Add link back to repo in case people find this in the wild * Fix comment typo * Fix comment (./prepare_pack.sh -jc) --- Jenkinsfile | 4 ++-- README.md | 7 +++++-- copy_java_files_to_pack.sh | 12 ------------ prepare_pack.sh | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 16 deletions(-) delete mode 100755 copy_java_files_to_pack.sh create mode 100755 prepare_pack.sh diff --git a/Jenkinsfile b/Jenkinsfile index e4a95b3..44725c7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,8 +6,8 @@ pipeline { stages { stage ('Build') { steps { - sh 'bash copy_java_files_to_pack.sh' - sh 'zip GeyserOptionalPack.mcpack -r . -x ".*" Jenkinsfile required_files.txt copy_java_files_to_pack.sh' + sh 'bash prepare_pack.sh -jc' + sh 'zip GeyserOptionalPack.mcpack -r . -x ".*" Jenkinsfile required_files.txt prepare_pack.sh' } post { success { diff --git a/README.md b/README.md index 77a3582..206b371 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ # GeyserOptionalPack -Optional Bedrock resource pack to extend Geyser functionality +Optional Bedrock resource pack to extend Geyser functionality. Learn more at [GeyserMC/GeyserOptionalPack](https://github.com/GeyserMC/GeyserOptionalPack). ### Implements - Armor base arms/baseplate visibility - Armor stand poses +- Illusioners - Iron golem cracked textures +- Missing particles +- Offhand animations - Shulker invisibility parity - Spectral arrow entity texture @@ -14,7 +17,7 @@ Currently is not in use yet. Stay tuned! ### Manually building -Run `copy_java_files_to_pack.sh` in this directory and the necessary files from the vanilla jar will be copied to the required directories. Zip up and you're set. +Run `./prepare_pack.sh` in this directory and the necessary files from the vanilla jar will be copied to the required directories. Zip up and you're set. Optionally, you may compress the output JSON files by running `./prepare_pack.sh -jc`. This should not be done when planning to contribute. You may then package with `zip GeyserOptionalPack.mcpack -r . -x ".*" Jenkinsfile required_files.txt prepare_pack.sh`. ### Legal diff --git a/copy_java_files_to_pack.sh b/copy_java_files_to_pack.sh deleted file mode 100755 index 9914e65..0000000 --- a/copy_java_files_to_pack.sh +++ /dev/null @@ -1,12 +0,0 @@ -wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar -unzip client.jar -d extracted/ -IFS=' ' -while read -r p || [ -n "$p" ]; do - read -rafilesToCopy<<< "$p" - echo "extracted/${filesToCopy[0]} ${filesToCopy[1]}" - mkdir -p "${filesToCopy[1]}" - cp "extracted/${filesToCopy[0]}" "${filesToCopy[1]}" -done tmp && mv tmp ${i} + done +fi