Skip to content

Commit 2aca5f5

Browse files
committed
fix cicd
1 parent fb27673 commit 2aca5f5

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.github/workflows/preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ jobs:
6464
- name: Adjust for LWJGL3
6565
if: matrix.buildType == 'lwjgl3'
6666
run: |
67-
uv run python ./buildtools/gen-lwjgl3-manifest.py
67+
uv run --directory ./buildtools python ./gen-lwjgl3-manifest.py
6868
cp -vf cmmc/manifest.json manifest.json
6969
7070
- name: Install Mods
7171
env:
7272
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
73-
run: uv run python ./buildtools/mod-install.py
73+
run: uv run --directory ./buildtools python ./mod-install.py
7474

7575
- name: Clean up placeholder files
7676
run: find . -name ".gitkeep" -delete

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ jobs:
6161
- name: Adjust for LWJGL3
6262
if: matrix.buildType == 'lwjgl3'
6363
run: |
64-
uv run python ./buildtools/gen-lwjgl3-manifest.py
64+
uv run --directory ./buildtools python ./gen-lwjgl3-manifest.py
6565
cp -vf cmmc/manifest.json manifest.json
6666
6767
- name: Install Mods
6868
env:
6969
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
70-
run: uv run python ./buildtools/mod-install.py
70+
run: uv run --directory ./buildtools python ./mod-install.py
7171

7272
- name: Clean up placeholder files
7373
run: find . -name ".gitkeep" -delete

buildtools/gen-lwjgl3-manifest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
]
1818

1919
# Read manifest.json
20-
with open('./manifest.json', 'r') as f:
20+
with open('../manifest.json', 'r') as f:
2121
data = json.load(f)
2222

2323
# Remove lwjgl3 not supported mods
2424
data['files'] = [item for item in data['files'] if item['projectID'] not in projectIDs]
2525

2626
# Write manifest.json
27-
with open('./cmmc/manifest.json', 'w') as f:
27+
with open('../cmmc/manifest.json', 'w') as f:
2828
json.dump(data, f, indent=2)

buildtools/mod-install.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ def main(key):
3333
with open(mod_json["data"]["fileName"], "wb") as f:
3434
shutil.copyfileobj(mod_file.raw, f)
3535

36-
# ./overrides/mods/
36+
# ../overrides/mods/
3737
if mod_json["data"]["fileName"].endswith(".jar"):
3838
if key["required"]:
39-
shutil.move(mod_json["data"]["fileName"], "./overrides/mods/")
39+
shutil.move(mod_json["data"]["fileName"], "../overrides/mods/")
4040
else:
41-
os.rename(mod_json["data"]["fileName"], "./overrides/mods/{}".format(mod_json["data"]["fileName"].replace(".jar", ".jar.disabled")))
41+
os.rename(mod_json["data"]["fileName"], "../overrides/mods/{}".format(mod_json["data"]["fileName"].replace(".jar", ".jar.disabled")))
4242

43-
# ./overrides/resourcepacks/
43+
# ../overrides/resourcepacks/
4444
elif mod_json["data"]["fileName"].endswith(".zip"):
4545
if key["required"]:
46-
shutil.move(mod_json["data"]["fileName"], "./overrides/resourcepacks/")
46+
shutil.move(mod_json["data"]["fileName"], "../overrides/resourcepacks/")
4747
else:
48-
os.rename(mod_json["data"]["fileName"], "./overrides/resourcepacks/{}".format(mod_json["data"]["fileName"].replace(".zip", ".zip.disabled")))
48+
os.rename(mod_json["data"]["fileName"], "../overrides/resourcepacks/{}".format(mod_json["data"]["fileName"].replace(".zip", ".zip.disabled")))
4949

5050
print("Downloaded {}".format(mod_json["data"]["fileName"]))
5151
else:
@@ -54,7 +54,7 @@ def main(key):
5454

5555

5656
## Import List
57-
manifest_json = json.load(open("./manifest.json"))
57+
manifest_json = json.load(open("../manifest.json"))
5858

5959
## Access CF and save file if request succeeds
6060
for key in manifest_json["files"]:

0 commit comments

Comments
 (0)