From 4622e751ea98d41fc0b6640aec64356e17a673b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Hrivn=C3=A1k?= Date: Fri, 1 Mar 2024 18:57:41 +0100 Subject: [PATCH] Test build --- .github/workflows/BuildMultiplatform.yml | 41 ++++++++++++++---------- pakku-lock.json | 36 --------------------- 2 files changed, 24 insertions(+), 53 deletions(-) diff --git a/.github/workflows/BuildMultiplatform.yml b/.github/workflows/BuildMultiplatform.yml index 01edea15..bf39a369 100644 --- a/.github/workflows/BuildMultiplatform.yml +++ b/.github/workflows/BuildMultiplatform.yml @@ -17,6 +17,7 @@ jobs: projectname: ${{ steps.info.outputs.projectname }} projectsuffix: ${{ steps.info.outputs.projectsuffix }} tag: ${{ steps.info.outputs.tag }} + diff: ${{ steps.info.outputs.diff }} steps: - name: Checkout @@ -30,50 +31,56 @@ jobs: run: | set +e + # -- CHECK LOCKFILE -- + if [ ! -f pakku-lock.json ]; then echo "::error::Could not find pakku-lock.json" && exit 1 fi + manifestjson=`cat pakku-lock.json` + # -- PROJECT NAME -- + projectname=`echo $(jq -r '.name' <<< "$manifestjson")` echo "projectname=$projectname" >> $GITHUB_OUTPUT + # -- TAG -- + latest_tag=$(git describe --tags --abbrev=0) echo "tag=$latest_tag" >> $GITHUB_OUTPUT + # -- PROJECT SUFFIX -- + if [[ ${{ startsWith(github.ref, 'refs/tags/v') }} == true ]]; then echo "projectsuffix=$latest_tag" >> $GITHUB_OUTPUT else echo "projectsuffix=build.${{ github.run_number }}" >> $GITHUB_OUTPUT fi - - name: Diff - shell: bash - run: | - set +e + # -- DIFF -- previous_commit=$(git log -n 1 --skip 1 --pretty=format:"%h" -- $manifest) - latest_tag=$(git describe --tags --abbrev=0) - latest_tagged_commit=$(git rev-list -n 1 --pretty=format:"%h" $latest_tag | sed -n 2p) - - if [ "$latest_tag" = ${{ steps.info.outputs.tag }} ]; then - latest_tag=$(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^) - latest_tagged_commit=$(git rev-list -n 1 --pretty=format:"%h" $latest_tag | sed -n 2p) - fi - - echo "latest commit: $latest_commit" - echo "latest tagged commit: $latest_tagged_commit" - - # -- CREATE DIFF -- - git show $previous_commit:./pakku-lock.json > ./pakku-lock-prev.json curl https://github.com/juraj-hrivnak/pakku/releases/latest/download/pakku.jar -o pakku.jar -L -J java -jar ./pakku.jar diff ./pakku-lock-prev.json ./pakku-lock.json --markdown PROJECTS_DIFF.md + echo "diff=$(cat PROJECTS_DIFF.md)" >> $GITHUB_OUTPUT + + # -- STEP SUMMARY -- + cat PROJECTS_DIFF.md >> $GITHUB_STEP_SUMMARY + - name: Send Discord message + uses: "hugoalh/send-discord-webhook-ghaction@v6.0.1" + if: ${{ steps.info.outputs.diff }} != '' + with: + key: ${{ secrets.DISCORD_WEBHOOK }} + content: ${{ steps.info.outputs.diff }} + username: "UnderBot" + avatar_url: "https://media.forgecdn.net/avatars/828/211/638215807562150866.png" + build-modpack: name: Build Modpack runs-on: ubuntu-latest diff --git a/pakku-lock.json b/pakku-lock.json index 651a89c8..e4a46f32 100644 --- a/pakku-lock.json +++ b/pakku-lock.json @@ -4598,42 +4598,6 @@ } ] }, - { - "pakku_id": "sAGxPbV9SM5kNvLV", - "type": "MOD", - "slug": { - "curseforge": "flans-mod-fixed-1-12-2" - }, - "name": { - "curseforge": "Flan's Mod Fixed [1.12.2]" - }, - "id": { - "curseforge": "971793" - }, - "files": [ - { - "type": "curseforge", - "file_name": "Flan's Mod-1.12.2-Chap-Fixed.v.1.7.6.jar", - "mc_versions": [ - "1.12.2" - ], - "loaders": [ - "forge" - ], - "release_type": "release", - "url": "https://edge.forgecdn.net/files/5086/781/Flan's Mod-1.12.2-Chap-Fixed.v.1.7.6.jar", - "id": "5086781", - "parent_id": "971793", - "hashes": { - "sha1": "d46fbec379ffc24d4dd2bc753288fa4392d8e6bd", - "md5": "82759f96530ca022e91e1400047661a5" - }, - "required_dependencies": [ - ], - "size": 1755899 - } - ] - }, { "pakku_id": "IynQqJFqVsjQYaeu", "type": "MOD",