[Idea]: Folia support for OpenInv #196

Closed
reabuc wants to merge 137 commits from master into master
52 changed files with 2351 additions and 351 deletions
Showing only changes of commit ff7243db6a - Show all commits

View File

@@ -32,7 +32,7 @@ function lookup_email_username() {
# Get a pretty list of supported Minecraft versions # Get a pretty list of supported Minecraft versions
function get_minecraft_versions() { function get_minecraft_versions() {
versions=$(. ./scripts/get_spigot_versions.sh) readarray -t versions <<< "$(. ./scripts/get_spigot_versions.sh)"
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
# Append comma if variable is set, then append version # Append comma if variable is set, then append version

View File

@@ -15,28 +15,21 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# TODO FIGURE OUT AND REMOVE WHEN LESS STRESS
hacky_versions=("1.16.5-R0.1-SNAPSHOT" "1.17-R0.1-SNAPSHOT")
for hacky_version in "${hacky_versions[@]}"; do
echo "$hacky_version"
done
exit 0
# Note that this script is designed for use in GitHub Actions, and is not # Note that this script is designed for use in GitHub Actions, and is not
# particularly robust nor configurable. Run from project parent directory. # particularly robust nor configurable. Run from project parent directory.
# Use a nameref as a cache - maven evaluation is pretty slow.
# Re-calling the script and relying on it to handle caching is way easier than passing around info.
declare -a spigot_versions
# We don't care about concatenation - either it's not null and we return or it's null and we instantiate.
# shellcheck disable=SC2199
if [[ ${spigot_versions[@]} ]]; then
for spigot_version in "${spigot_versions[@]}"; do
echo "$spigot_version"
done
return
fi
# Pull Spigot dependency information from Maven. # Pull Spigot dependency information from Maven.
# Since we only care about Spigot versions, only check modules in the folder internal. # Since we only care about Spigot versions, only check modules in the folder internal.
readarray -t modules <<< "$(mvn help:evaluate -Dexpression=project.modules -q -DforceStdout -P all | grep -oP '(?<=<string>)(internal/.*)(?=</string>)')" readarray -t modules <<< "$(mvn help:evaluate -Dexpression=project.modules -q -DforceStdout -P all | grep -oP '(?<=<string>)(internal/.*)(?=</string>)')"
declare -n versions="spigot_versions"
for module in "${modules[@]}"; do for module in "${modules[@]}"; do
# Get number of dependencies declared in pom of specified internal module. # Get number of dependencies declared in pom of specified internal module.
max_index=$(mvn help:evaluate -Dexpression=project.dependencies -q -DforceStdout -P all -pl "$module" | grep -c "<dependency>") max_index=$(mvn help:evaluate -Dexpression=project.dependencies -q -DforceStdout -P all -pl "$module" | grep -c "<dependency>")

View File

@@ -30,8 +30,8 @@ get_buildtools () {
wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O $buildtools wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O $buildtools
} }
versions=$(. ./scripts/get_spigot_versions.sh) readarray -t versions <<< "$(. ./scripts/get_spigot_versions.sh)"
echo Found Spigot dependencies: "$versions" echo Found Spigot dependencies: "${versions[@]}"
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
set -e set -e

View File

@@ -20,7 +20,7 @@
# Parse Spigot dependency information into major Minecraft versions # Parse Spigot dependency information into major Minecraft versions
function get_curseforge_minecraft_versions() { function get_curseforge_minecraft_versions() {
versions=$(. ./scripts/get_spigot_versions.sh) readarray -t versions <<< "$(. ./scripts/get_spigot_versions.sh)"
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
# Parse Minecraft major version # Parse Minecraft major version