-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
71 lines (50 loc) · 1.66 KB
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
default: build
iteration := "II"
# Force env for server mods to be both
fix-envs:
rg -l 'side = "server"' \
| xargs -i sed -i 's/^side = "server"/side = "both"/'" {}"
sed -i 's/^side = "both"/side = "client"/' mods/fancymenu.pw.toml
# Build the prism pack
prism:
#!/usr/bin/env bash
set -euxo pipefail
eval "$(tombl -e VERSIONS=versions pack.toml)"
export ITERATION='{{iteration}}'
export MC_VERSION=${VERSIONS[minecraft]}
export FABRIC_VERSION=${VERSIONS[fabric]}
cd include/Prism
for file in *.template; do
envsubst -i "$file" -o "${file%.template}"
done
cp ../unsup.ini .minecraft
zip -r Prism.zip * .minecraft -x '*.template'
mv Prism.zip "../../build/Pseudoscience.Iteration.$ITERATION.Prism.zip"
rm .minecraft/unsup.ini
# Build the cf pack
curseforge:
#!/usr/bin/env bash
set -euxo pipefail
cp pack.toml include/Curseforge
cd include/Curseforge
touch index.toml
wget https://git.sleeping.town/unascribed/unsup/releases/download/v0.2.3/unsup-0.2.3.jar -O unsup.jar
cp ../unsup.ini .
packwiz refresh
packwiz cf export -y -o ../../build/Pseudoscience.Iteration.{{iteration}}.Curseforge.zip
# Build a profile for the vanilla launcher
launcher:
#!/usr/bin/env bash
set -euxo pipefail
eval "$(tombl -e VERSIONS=versions pack.toml)"
export ITERATION='{{iteration}}'
export MC_VERSION=${VERSIONS[minecraft]}
export FABRIC_VERSION=${VERSIONS[fabric]}
envsubst -i include/Launcher/profile.json.template \
-o build/profile.json
# Clean old builds
clean:
rm -rf build
mkdir -p build
# Build all packs
build: clean fix-envs prism curseforge launcher