-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (54 loc) · 1.55 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
API_SERVER = api
API_TEST_DIR = test
WEB_SERVER = web
DOCS_DIR = api/docs
.PHONY: api-server
api-server:
cd $(API_SERVER); go run main.go
.PHONY: test-api
api-test:
jasmine-node api/test --verbose
.PHONY: serve
serve:
cd $(WEB_SERVER); python -m SimpleHTTPServer
.PHONY: docs
docs:
aglio -i $(DOCS_DIR)/api.md -o $(DOCS_DIR)/index.html
@echo '----------------------'
@echo 'API Docs updated.'
@echo 'Available at /api/docs'
@echo '----------------------'
.PHONY: install-go-deps
install-go-deps:
@echo '--------------------------'
@echo 'Getting Go dependencies...'
@echo '--------------------------'
cd $(API_SERVER); go get all; cd ..
@echo '-----------------'
@echo 'Packages installed.'
@echo '-----------------'
.PHONY: update-go-deps
update-go-deps:
@echo '---------------------------'
@echo 'Updating Go dependencies...'
@echo '---------------------------'
cd $(API_SERVER); go get -u all; cd ..
@echo '-----------------'
@echo 'Packages updated.'
@echo '-----------------'
# http://stackoverflow.com/questions/8889035/how-to-document-a-makefile
.PHONY: help
help:
@echo 'Makefile to assist with initializing Ricetta.'
@echo ''
@echo 'Usage:'
@echo ''
@echo ' make [command]'
@echo ''
@echo 'The commands are:'
@echo ''
@echo ' api-server - Load typical API server session using local database'
@echo ' docs - Build Aglio docs for the API'
@echo ' install-go-deps - Install Go package dependencies'
@echo ' update-go-deps - Update Go package dependencies'
@echo ''