-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
68 lines (51 loc) · 1.54 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
62
63
64
65
66
67
68
CONFIG_JSON_PATH = "${APPDATA}/unofficial-homestuck-collection/config.json"
.SECONDEXPANSION:
.SUFFIXES:
default: test
## Setup
# We do actually use a dummy install file to track this
yarn.lock: package.json
yarn install # --ignore-optional
touch yarn.lock
install: package.json yarn.lock
yarn install
touch install
## Prep actions
.PHONY: clean
clean:
yarn cache clean
-rm yarn-error.log
-rm ./install src/imods.tar.gz
-rm -r node_modules/.cache/
-rm -r dist/ dist_electron/*/
.PHONY: lint
lint: install
yarn run vue-cli-service lint
# yarn lint
## Intermediate files
src/imods.tar.gz: $(wildcard src/imods/*) $(wildcard src/imods/*/*)
# cd src && tar -czf imods.tar.gz imods/
cd src && tar -cf - imods/ | gzip -9 - > imods.tar.gz
# -jq '.appVersion = "2.0.0"' ${CONFIG_JSON_PATH} > ${CONFIG_JSON_PATH}.tmp
# -mv ${CONFIG_JSON_PATH}.tmp ${CONFIG_JSON_PATH}
## Running live
# Run 'rm src/imods.tar.gz; SERVE_FLAGS="--reset-last-version" make src/imods.tar.gz test' to make imods and pass --reset-last-version through
.PHONY: test
test: install src/imods.tar.gz
yarn run vue-cli-service electron:serve $(SERVE_FLAGS)
# yarn dev
.PHONY: itest
itest:
-rm src/imods.tar.gz
SERVE_FLAGS="--reset-last-version" make src/imods.tar.gz test
## Building output
.PHONY: build
build: install src/imods.tar.gz
yarn run vue-cli-service electron:build
# yarn electron:build
.PHONY: publish-release
publish-release: install src/imods.tar.gz
yarn run vue-cli-service electron:build -p always
.PHONY: help
help:
grep -E '(^[^.#[:space:]].*:)|(##)' Makefile