-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 846 Bytes
/
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
# Set up
APPLICATION=forex-clock
BIN=forex-clock
DOCSCMD=aglio
GOCMD=go
GOBUILD=$(GOCMD) build
GOGET=$(GOCMD) get
# Build and test during normal execution
all: build test
build: get
@echo "Building binary..."
$(GOBUILD) -o dist/$(BIN)
docs: docs-deps
@echo "Generating API documentation"
npm run-script generate-api-docs
@echo "Documentation generated, open docs/api-output.html via a browser."
docs-deps:
@echo "Installing documentation dependencies..."
@echo "Installing $(DOCSCMD)..." && npm install
get:
@echo "Getting external packages..."
$(GOGET) -u -t ./...
release: build
@echo "Releasing version $V..."
pops release -a $(APPLICATION) -v $V -d .
run: build
@echo "Running built binary..."
dist/$(BIN)
run-prod:
@echo "Running built binary..."
dist/$(BIN)
.PHONY: all build docs docs-deps get release run run-prod