Skip to content

Commit

Permalink
updates + sidedness fix in-script
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Jul 8, 2024
1 parent 574cc44 commit 9d29ca2
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
8 changes: 4 additions & 4 deletions pack/index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ metafile = true

[[files]]
file = "mods/fabric-api.pw.toml"
hash = "e638ef1b06cafcd208d18118d8cc9af49750c26d686fcc97fecce163c5aff56a"
hash = "6cd2d021b71d8172819a6a793ea7a6276822da398c3c74a63b022991414024e5"
metafile = true

[[files]]
Expand Down Expand Up @@ -687,7 +687,7 @@ metafile = true

[[files]]
file = "mods/modernfix.pw.toml"
hash = "cc11c1fb39cdb35ac006ddd77bc33dc578e5ff1314ea76c2b9162ec5b53b10cd"
hash = "5fbbac1c793dc2c4d1068111f6677125c1c8429657d65427da75720ec22942b5"
metafile = true

[[files]]
Expand Down Expand Up @@ -722,7 +722,7 @@ metafile = true

[[files]]
file = "mods/picturesign.pw.toml"
hash = "bb0153edb8f41c61d12e21b72b6fa9d17a4fc7d08cda3e5eed8b940527448a17"
hash = "df28570d634aaf34fee0add2f05290ce975a4f664a82d49e9b30bce810d24580"
metafile = true

[[files]]
Expand Down Expand Up @@ -822,7 +822,7 @@ metafile = true

[[files]]
file = "mods/surveyor.pw.toml"
hash = "b55a34fdf539b5c2ebac7b74b35a3f7a07fbcafd6fc58c625cec4c59fc2b53de"
hash = "3bb5bc1e79455c2d4cb4c400f2cb7fbb331820ca2a7ad31a7b29a7171bb9d186"
metafile = true

[[files]]
Expand Down
8 changes: 4 additions & 4 deletions pack/mods/fabric-api.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Fabric API"
filename = "fabric-api-0.100.5+1.21.jar"
filename = "fabric-api-0.100.6+1.21.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/mDmQIaOM/fabric-api-0.100.5%2B1.21.jar"
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/Y0cpssyN/fabric-api-0.100.6%2B1.21.jar"
hash-format = "sha1"
hash = "00e90d988d4432935c3de2f17deacb3edc57390f"
hash = "dd92d95977c960affefc6c29e3ee946ce7b4723a"

[update]
[update.modrinth]
mod-id = "P7dR8mSH"
version = "mDmQIaOM"
version = "Y0cpssyN"
8 changes: 4 additions & 4 deletions pack/mods/modernfix.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "ModernFix"
filename = "modernfix-fabric-5.18.5+mc1.21.jar"
filename = "modernfix-fabric-5.18.6+mc1.21.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/nmDcB62a/versions/Tx3ph266/modernfix-fabric-5.18.5%2Bmc1.21.jar"
url = "https://cdn.modrinth.com/data/nmDcB62a/versions/NUPJxyji/modernfix-fabric-5.18.6%2Bmc1.21.jar"
hash-format = "sha1"
hash = "95a0baee24767b7b343d948f1149bec6a56c31e3"
hash = "277669d7a747d5e6e9a0cdb67e5934cb09f818b0"

[update]
[update.modrinth]
mod-id = "nmDcB62a"
version = "Tx3ph266"
version = "NUPJxyji"
8 changes: 4 additions & 4 deletions pack/mods/picturesign.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "PictureSign"
filename = "picturesign-fabric-2.0.0.jar"
filename = "picturesign-fabric-2.0.1.jar"
side = "client"

[download]
url = "https://cdn.modrinth.com/data/9WP2dmkk/versions/f6MZUNMy/picturesign-fabric-2.0.0.jar"
url = "https://cdn.modrinth.com/data/9WP2dmkk/versions/Fufi3aiS/picturesign-fabric-2.0.1.jar"
hash-format = "sha1"
hash = "dac58fe9fdd5a561bfb357c817603e0ddfc5cbd2"
hash = "daab5872b080a2bdeeda218587a78d55745df60c"

[update]
[update.modrinth]
mod-id = "9WP2dmkk"
version = "f6MZUNMy"
version = "Fufi3aiS"
8 changes: 4 additions & 4 deletions pack/mods/surveyor.pw.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Surveyor Map Framework"
filename = "surveyor-0.6.7+1.21.jar"
filename = "surveyor-0.6.8+1.21.jar"
side = "both"

[download]
url = "https://cdn.modrinth.com/data/4KjqhPc9/versions/pLWHAgyZ/surveyor-0.6.7%2B1.21.jar"
url = "https://cdn.modrinth.com/data/4KjqhPc9/versions/yzO0jzIV/surveyor-0.6.8%2B1.21.jar"
hash-format = "sha1"
hash = "094f231ff06fddc0068a1e70de07684725cc58e9"
hash = "6885083a92b935895874fbc31f19b6a684d3a4c0"

[update]
[update.modrinth]
mod-id = "4KjqhPc9"
version = "pLWHAgyZ"
version = "yzO0jzIV"
2 changes: 1 addition & 1 deletion pack/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 = "35c2ab0dc6fd18bf716a29f12a8606e9ab92639c261c7dfc5a49570a0dd86ed3"
hash = "2cce8b12b290a716694711d32ca94b0b57b060a78fb9c2d3b251bb7b7121a423"

[versions]
fabric = "0.15.11"
Expand Down
22 changes: 19 additions & 3 deletions scripts/update.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import json5
import os
import shutil
import requests
import time
import subprocess
import time
import re
from pathlib import Path

import json5
import requests


def find_replace(directory, find, replace, file_pattern):
for file in [f for f in directory.glob(file_pattern)]:
try:
file_contents = file.read_text()
new_file_contents = re.sub(f"{find}", f"{replace}", file_contents)
file.write_text(new_file_contents, newline='\n')
except UnicodeDecodeError:
pass


def packwiz_pretty_print(command, ignore_errors=False):
Expand Down Expand Up @@ -87,6 +100,9 @@ def main():
for mod in overrides_remove:
packwiz_pretty_print('packwiz remove ' + mod['project_id'], ignore_errors=True)

# Swap server-side mods to both-sides for singleplayer use
find_replace(Path(mods_path), "side = \"server\"", "side = \"both\"", "*.pw.toml")

# Copy in overriding jar files, you heretic
shutil.copytree(overrides_path, './mods', dirs_exist_ok=True) # Python 3.8 :pineapple:

Expand Down

0 comments on commit 9d29ca2

Please sign in to comment.