From 7b5c7e92feda98c1b14c061f4a2a9d7755672f29 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 28 Dec 2024 13:51:41 +0100 Subject: [PATCH] Try that --- .forgejo/workflows/build.yml | 12 +++++++----- src/main/resources/plugin.yml | 2 +- tools/download_nms.sh | 19 +++++++++++++++++++ tools/hashes.txt | 1 + 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100755 tools/download_nms.sh create mode 100644 tools/hashes.txt diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index f467172..4b28e7e 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,6 +1,6 @@ on: [push] jobs: - deploy: + build: runs-on: docker container: debian:sid steps: @@ -9,16 +9,18 @@ jobs: - name: Install JDK and other deps run: apt install --no-install-recommends -y openjdk-21-jdk-headless maven git nodejs curl zstd + - name: Clone repository + run: git clone https://git.m724.eu/Minecon724/tweaks724.git . + #- name: BuildTools for NMS # run: mkdir /tmp/buildtools && cd /tmp/buildtools && curl -O https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && java -jar BuildTools.jar --rev 1.21.1 --remapped && cd - name: Download NMS - run: curl -O https://git.m724.eu/Minecon724/temporary/raw/branch/master/XRIH.tar.zst && tar -xaf XRIH.tar.zst -C ~ && rm XRIH.tar.zst + run: ./tools/download_nms.sh ~ - - name: Clone repository - run: git clone https://git.m724.eu/Minecon724/tweaks724.git . - - name: Build + - name: Build for 1.21.1 run: mvn clean package + - name: Upload artifacts uses: https://github.com/actions/upload-artifact@v3 with: diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index c8b67c3..3ef555e 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -5,7 +5,7 @@ website: https://www.spigotmc.org/resources/tweaks724.121057/ main: eu.m724.tweaks.TweaksPlugin api-version: 1.21.1 -softdepend: [ProtocolLib] +softdepend: [ProtocolLib, for-${project.spigot.version}] libraries: - eu.m724:mstats-spigot:0.1.0 diff --git a/tools/download_nms.sh b/tools/download_nms.sh new file mode 100755 index 0000000..c22aac4 --- /dev/null +++ b/tools/download_nms.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# +# Copyright (C) 2024 Minecon724 +# Tweaks724 is licensed under the GNU General Public License. See the LICENSE.md file +# in the project root for the full license text. +# + +FILENAME=MS4yMS4xLTQK.tar.zst + +curl -O https://36ab09b1.m724.eu/$FILENAME +if [ "$(sha512sum $FILENAME)" = "475b931b6dde126aafd3f959bd02e122aa3c671ad11e83cbe1a9c9ea771a424f203381aa31e4ab40052dae1bfbe96c61daa81add1afab46dd423a5f038d68a6b MS4yMS4xLTQK.tar.zst" ]; then + tar -xaf $FILENAME -C "$1" + rm $FILENAME +else + echo "Checksum invalid" + rm $FILENAME + exit 1 +fi diff --git a/tools/hashes.txt b/tools/hashes.txt new file mode 100644 index 0000000..e72173b --- /dev/null +++ b/tools/hashes.txt @@ -0,0 +1 @@ +475b931b6dde126aafd3f959bd02e122aa3c671ad11e83cbe1a9c9ea771a424f203381aa31e4ab40052dae1bfbe96c61daa81add1afab46dd423a5f038d68a6b MS4yMS4xLTQK.tar.zst \ No newline at end of file