Skip to content

Commit

Permalink
Create get-mc-version.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschipcraft authored Jul 25, 2021
1 parent 665c443 commit 1238ee0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/get-mc-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# Derives the MC Version from the package version.
pack_version=$(jq '.pack.pack_format' pack.mcmeta)
case "$pack_version" in
1 )
echo ::set-output name=MC_VERSION::"1.6.1-1.8.9"
;;
2 )
echo ::set-output name=MC_VERSION::"1.9-1.10.2"
;;
3 )
echo ::set-output name=MC_VERSION::"1.11-1.12.2"
;;
4 )
echo ::set-output name=MC_VERSION::"1.13-1.14.4"
;;
5 )
echo ::set-output name=MC_VERSION::"1.15-1.16.1"
;;
6 )
echo ::set-output name=MC_VERSION::"1.16.2-1.16.3"
;;
7 )
echo ::set-output name=MC_VERSION::"1.17"
;;
esac

0 comments on commit 1238ee0

Please sign in to comment.