-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (53 loc) · 1.86 KB
/
Makefile
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
ID := warp-core
VERSION := develop
LOADER := quilt
MINECRAFT := 1.19.2
default:
@echo "No Default make command configured"
@echo "Please use either"
@echo " - make curseforge"
@echo " - make modrinth"
@echo " - make prism"
@echo " - make technic"
@echo " - make all"
@echo ""
@echo "Curseforge will make a curseforge compatible zip"
@echo ""
@echo "Modrinth will make a Modrinth compatible mrpack"
@echo ""
@echo "All will make all packs it can"
@echo ""
curseforge:
@echo "Making ${MINECRAFT} Curseforge pack"
-mkdir ./build
cd build && packwiz curseforge export --pack-file ../pack/${MINECRAFT}/pack.toml
modrinth:
@echo "Making ${MINECRAFT} Modrinth pack"
-mkdir ./build
cd build && packwiz modrinth export --pack-file ../pack/${MINECRAFT}/pack.toml
quilt-server:
@echo "Making Server pack"
sed -i -e '/MINECRAFT=/ s/= .*/="${MINECRAFT}"/' ./server/start.sh
wget -nc https://maven.quiltmc.org/repository/release/org/quiltmc/quilt-installer/0.5.0/quilt-installer-0.5.0.jar -P build
cd build && java -jar quilt-installer-*.jar \
install server ${MINECRAFT} \
--download-server
-rm build/quilt-installer-*.jar
-cp -r ./server/* ./build/server
release:
sed -i -e '/VERSION=/s/=.*/="release"/' ./server/start.sh
sed -i -e '/VERSION=/s/=.*/="release"/' ./server/start.bat
sed -i -e '/version =/ s/= .*/= "${VERSION}"/' pack/${MINECRAFT}/pack.toml
make modrinth
make curseforge
make quilt-server
ID=${ID} VERSION=${VERSION} LOADER=${LOADER} MINECRAFT=${MINECRAFT} MODRINTH_TOKEN=${MODRINTH_TOKEN} gradle modrinth
clean:
-rm -rf build/
sed -i -e '/VERSION=/s/=.*/="develop"/' ./server/start.sh
sed -i -e '/VERSION=/s/=.*/="develop"/' ./server/start.bat
sed -i -e '/version =/ s/= .*/= "${VERSION}"/' ./pack/pack.toml
-git gc --aggressive --prune
update:
go install github.com/packwiz/packwiz@latest
all: curseforge modrinth prism server clean