-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
56 lines (47 loc) · 1.49 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
QUIET := &>/dev/null
# Ensures we have all required dependencies
deps:
@echo "--> Ensuring dependencies are up to date"
@which dep $(QUIET) || go get -u github.com/golang/dep/cmd/dep
@which packr $(QUIET) || go get -u github.com/gobuffalo/packr/...
@which goreleaser $(QUIET) || go get github.com/goreleaser/goreleaser
@dep ensure
@echo "--> Dependencies up to date"
# Builds the go binary
build: deps
packr build
# Installs binary as 'exo' which is what it gets distributed as
install: deps
@echo "--> Building UI"
@cd ui && yarn run build
packr build -o $(GOPATH)/bin/exodev
@echo "--> Exo successfully installed"
@echo
@exo
# Bootstraps a contributing setup to make getting involved in project easier
bootstrap: install
@echo "--> Creating new example wiki for you"
@mkdir ../example-wiki && cd ../example-wiki && exo init && git init && git init && git add -A && git commit -m "First Commit"
@echo "--> Starting up the wiki"
@cd ../example-wiki && exo start . &
@open http://localhost:1234
# Releases new version of exo to GitHub and Homebrew
release:
@echo "--> Releasing"
@goreleaser -p 1 --rm-dist -config .goreleaser.yml
@echo "--> Complete"
pre-release:
@echo "--> Building UI"
@cd ui && yarn run build
@echo "--> Building packr"
@packr
post-release:
@echo "--> Cleaning packr"
@packr clean
# Tests the packages
test:
@echo "--> Testing the backend"
@go test ./...
@echo "--> Testing the frontend"
@cd ./ui && yarn run test
.PHONY: build deps install test bootstrap release