forked from flyteorg/flyteidl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (44 loc) · 1.43 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
#!/bin/bash
export REPOSITORY=flyteidl
include boilerplate/lyft/golang_test_targets/Makefile
define PIP_COMPILE
pip-compile $(1) --upgrade --verbose
endef
.PHONY: update_boilerplate
update_boilerplate:
@boilerplate/update.sh
.PHONY: generate
generate: install # install tools, generate protos, mocks and pflags
./generate_protos.sh
./generate_mocks.sh
go generate ./...
.PHONY: test
test: install # ensures generate_protos script has been run
git diff
./generate_mocks.sh
go generate ./...
DELTA_CHECK=true ./generate_protos.sh
.PHONY: test_unit
test_unit:
# we cannot use test_unit from go.mk because generated files contain commented import statements that
# go tries to intepret. So we need to use go list to get the packages that go understands.
go test -cover `go list ./...` -race
.PHONY: build_python
build_python:
@python setup.py sdist
.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)
PLACEHOLDER := "__version__\ =\ \"develop\""
PLACEHOLDER_NPM := \"version\": \"develop\"
.PHONY: update_pyversion
update_pyversion:
grep "$(PLACEHOLDER)" "setup.py"
sed -i "s/$(PLACEHOLDER)/__version__ = \"${VERSION}\"/g" "setup.py"
.PHONY: update_npmversion
update_npmversion:
grep "$(PLACEHOLDER_NPM)" "package.json"
sed -i "s/$(PLACEHOLDER_NPM)/\"version\": \"${VERSION}\"/g" "package.json"