Skip to content

Commit

Permalink
Test build
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Mar 1, 2024
1 parent 9214fd5 commit 4622e75
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 53 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/BuildMultiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
36 changes: 0 additions & 36 deletions pakku-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4622e75

Please sign in to comment.