-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 684 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 684 Bytes
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
SHELL := /bin/bash
MOD_NAME := advanced-robots
MOD_VERSION := $(shell cat info.json | jq -r .version)
ARCHIVE_NAME := $(MOD_NAME)_$(MOD_VERSION)
.PHONY: setup
setup:
aqua i
.PHONY: clean
clean:
rm -rf bin
.PHONY: format
format:
stylua ./
.PHONY: files
files:
@comm -23 <(git ls-files | sort) <(cat package.ignore | sort)
.PHONY: package
package: clean format
mkdir -p bin/$(ARCHIVE_NAME)
rsync -v --files-from=<(make files) . bin/$(ARCHIVE_NAME)
cd bin; zip -r $(ARCHIVE_NAME).zip $(ARCHIVE_NAME)
@echo
zipinfo bin/$(ARCHIVE_NAME).zip
.PHONY: install
install: package
cp bin/$(ARCHIVE_NAME).zip $${HOME}'/Library/Application Support/factorio/mods'/$(ARCHIVE_NAME).zip