forked from flyteorg/flytectl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.08 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
export REPOSITORY=flytectl
include boilerplate/flyte/golang_test_targets/Makefile
include boilerplate/flyte/precommit/Makefile
GIT_VERSION := $(shell git describe --always --tags)
GIT_HASH := $(shell git rev-parse --short HEAD)
TIMESTAMP := $(shell date '+%Y-%m-%d')
PACKAGE ?=github.com/flyteorg/flytestdlib
LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)"
define PIP_COMPILE
pip-compile $(1) --upgrade --verbose
endef
generate:
go test github.com/flyteorg/flytectl/cmd --update
compile:
go build -o bin/flytectl -ldflags=$(LD_FLAGS) main.go
compile_debug:
go build -gcflags='all=-N -l' -o bin/flytectl main.go
.PHONY: update_boilerplate
update_boilerplate:
@curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh
@boilerplate/update.sh
.PHONY: install-piptools
install-piptools:
pip install -U pip-tools
.PHONY: doc-requirements.txt
doc-requirements.txt: doc-requirements.in install-piptools
$(call PIP_COMPILE,doc-requirements.in)