-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
53 lines (42 loc) · 1.1 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
include hack/make-rules/common.mk
include hack/make-rules/copyright.mk
include hack/make-rules/image.mk
include hack/make-rules/golang.mk
include hack/make-rules/grpc.mk
include hack/make-rules/swagger.mk
include hack/make-rules/tools.mk
ROOT_PACKAGE=github.com/Bio-OS/bioos
VERSION ?= $(shell git describe --tags --always --dirty)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
GIT_COMMIT ?= $(shell git rev-parse HEAD)
GIT_TREE_STATE ?= $(if $(shell git status --porcelain),dirty,clean)
GIT_BUILD_TIME ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
GO_VERSION ?= $(shell go version)
.PHONY: build
build: go.build web
.PHONY: image
image: image.build
.PHONY: push
push: image.push
.PHONY: tools
tools:
@$(MAKE) tools.install
.PHONY: swagger
swagger: swagger.run
## web install
.PHONY: web.install
web.install:
npm --prefix=web install
## web dev
.PHONY: web.run
web.run:
npm --prefix=web run dev
## web build
.PHONY: web
web:
@echo "===========> Building web"
npm --prefix=web run build
.PHONY: clean
clean:
@echo "===========> Cleaning all build binary"
@-rm -vrf $(OUTPUT_DIR)