forked from abyssal-descent/abyssal-descent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 1.1 KB
/
Makefile
File metadata and controls
46 lines (37 loc) · 1.1 KB
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
VERSION="0.1.0"
REPO=$(shell pwd)
default:
@echo "No target specified"
.PHONY: build
build:
@mkdir -p build/mods 2>/dev/null
cd "$(REPO)/src/dimthing" && INSTALL_DIR="$(REPO)/build/mods" make install
cd "$(REPO)/src/adresources" && INSTALL_DIR="$(REPO)/build/mods" make install
.PHONY: build-ports
build-ports:
@mkdir -p build/mods 2>/dev/null
cd "$(REPO)/src/ports/dimthing" && INSTALL_DIR="$(REPO)/build/mods" make install
cd "$(REPO)/src/ports/adresources" && INSTALL_DIR="$(REPO)/build/mods" make install
.PHONY: install
install:
@mkdir -p build/mods 2>/dev/null
tail -n +2 mods.csv | awk 'BEGIN {FS = ","} { \
gsub(/[\n\r]/, "", $$3); \
cmd = "curl -sSLo \"build/mods/"$$1".jar\" \"https://www.curseforge.com/api/v1/mods/"$$2"/files/"$$3"/download""\""; \
print cmd; system(cmd) }'
.PHONY: copy
copy:
@mkdir -p build 2>/dev/null
cp -r overrides/* build/
.PHONY: all
all: build install copy
echo "dev-$(VERSION)" $$(git rev-parse --short HEAD) > build/release.txt
.PHONY: export
export:
cp -r build/* "$(EXPORT_DIR)/"
.PHONY: clean
clean:
rm -r build
.PHONY: zip
zip:
zip build.zip build