makefile 640 Bytes
Newer Older
1
decker := $(shell stack path | grep local-install-root | sed "s/local-install-root: //")/bin/decker
2
version := $(shell grep "version: " package.yaml | sed "s/version: *//")
3 4

build:
5 6 7 8 9
	cd resource
	cd support
	yarn install
	cd ..
	cd ..
Henrik Tramberend's avatar
Henrik Tramberend committed
10
	stack build -j 8 --fast
Henrik Tramberend's avatar
Henrik Tramberend committed
11 12

dist: build
13
	rm -rf dist
14
	mkdir -p dist
15
	ln -s $(decker) dist/decker-$(version) 
Henrik Tramberend's avatar
Henrik Tramberend committed
16
	zip -qj dist/decker-$(version).zip dist/decker-$(version)
17
	rm dist/decker-$(version)
18

Henrik Tramberend's avatar
Henrik Tramberend committed
19
test:
Henrik Tramberend's avatar
Henrik Tramberend committed
20
	stack test -j 8 --fast
Henrik Tramberend's avatar
Fixes  
Henrik Tramberend committed
21

22
watch:
Henrik Tramberend's avatar
Henrik Tramberend committed
23
	stack test -j 8 --fast --file-watch
24

25 26
clean:
	stack clean
27
	rm -rf dist
28

Henrik Tramberend's avatar
Henrik Tramberend committed
29 30
install: build
	stack exec -- decker clean
31 32
	stack install

Henrik Tramberend's avatar
Henrik Tramberend committed
33
.PHONY: build clean test install dist docs