Skip to content

Commit

Permalink
Add sleep-warp
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Oct 23, 2023
1 parent 1da92dd commit a5c2006
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/create-changelog.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

current_semver="$(git tag | tail -n 1)"
previous_semver="$(git tag | tail -n 2 | head -n 1)"
current_semver="$(git tag | grep -v "latest" | tail -n 1)"
previous_semver="$(git tag | grep -v "latest" | tail -n 2 | head -n 1)"
new_files=($(git diff --name-only --diff-filter=A "$previous_semver..$current_semver" | sort | grep -E 'mods|resourcepacks|shaderpacks'))
modified_files=($(git diff --name-only --diff-filter=M "$previous_semver..$current_semver" | sort | grep -E 'mods|resourcepacks|shaderpacks'))
removed_files=($(git diff --name-only --diff-filter=D "$previous_semver..$current_semver" | sort | grep -E 'mods|resourcepacks|shaderpacks'))
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/process-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Check if any new mods, resourcepacks or shaderpacks were added. If so, we're bumping the semver minor version up by one
new_semver=""
current_semver="$(grep -Po 'version = "\K[^"]+' pack.toml)"
new_or_removed_files=($(git diff --name-only --diff-filter=AD HEAD~1 | grep -E 'mods|resourcepacks|shaderpacks'))
modified_files=($(git diff --name-only --diff-filter=M HEAD~1 | grep -E 'mods|resourcepacks|shaderpacks'))
new_or_removed_files=($(git diff --name-only --diff-filter=AD $current_semver..HEAD | grep -E 'mods|resourcepacks|shaderpacks'))
modified_files=($(git diff --name-only --diff-filter=M $current_semver..HEAD | grep -E 'mods|resourcepacks|shaderpacks'))
if [ "${#new_or_removed_files[@]}" -gt 0 ]; then
# Bump the semver minor version up by one and reset the patch version to zero
new_semver="$(echo $current_semver | awk -F. -v OFS=. '{$(NF-1)++; $NF=0; print}')"
Expand Down Expand Up @@ -40,8 +40,8 @@ if [ ! -z "$new_semver" ]; then
git push > /dev/null

# Create a new tag
git tag -a "$new_semver" -m "Release $new_semver." > /dev/null
git tag -a "latest" -m "Release $new_semver." -f > /dev/null
git tag -a "$new_semver" -m "Release $new_semver." > /dev/null
git push --tags --force > /dev/null

echo "bump=true" >> $GITHUB_OUTPUT
Expand Down
9 changes: 7 additions & 2 deletions index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ hash-format = "sha256"

[[files]]
file = ".github/scripts/create-changelog.sh"
hash = "6cf1b5501b2be7d5e02ee3c772693422555a3f4bf97ee253308ec9b2f3e97b2a"
hash = "1d05c006d9565b1767d8172f63ae4d182b267996f6a1b00d47de3b22d4c5c476"

[[files]]
file = ".github/scripts/process-commit.sh"
hash = "20bd2badf7ea45c981e6109324eba39f16aa2fe52d0ab03b18e3d2e7d7660488"
hash = "69d1178c95a3d5720b1efce946b7ce5d178fddabc7e424dd65ca1834af222d0b"

[[files]]
file = ".github/workflows/process-commit.yml"
Expand Down Expand Up @@ -325,6 +325,11 @@ file = "mods/skinrestorer.pw.toml"
hash = "d4ce2e907ac37eb1c7d4232354fa28e1a2bb9e00999ae6811e5fc587824132e2"
metafile = true

[[files]]
file = "mods/sleep-warp.pw.toml"
hash = "25c6c26c56658a11b6cdd930ba2403817c52718824033077615890a1d00ece32"
metafile = true

[[files]]
file = "mods/sodium.pw.toml"
hash = "9a927c3e0830ba32e1b8a2e543597781724462595b8cce58f676962b442bb52b"
Expand Down
13 changes: 13 additions & 0 deletions mods/sleep-warp.pw.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = "SleepWarp"
filename = "sleepwarp-2.2.0_rc1+1.20.1.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/OPvzuqtZ/versions/l4cnghUz/sleepwarp-2.2.0_rc1%2B1.20.1.jar"
hash-format = "sha1"
hash = "d3bb492a3b3c0f93ac1812f2ded8618e6acc7bab"

[update]
[update.modrinth]
mod-id = "OPvzuqtZ"
version = "l4cnghUz"
2 changes: 1 addition & 1 deletion pack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
[index]
file = "index.toml"
hash-format = "sha256"
hash = "0483dddc350921195f9f32ddbefedab441ec6d66904c1e0188e9778c037dc581"
hash = "b98531debb2f1af3ceafd557e908ebca58af50d8a41244cadf5dfa1f284ddaf7"

[versions]
fabric = "0.14.23"
Expand Down

0 comments on commit a5c2006

Please sign in to comment.