This repository was archived by the owner on Nov 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdefault.mk
More file actions
47 lines (39 loc) · 1.26 KB
/
default.mk
File metadata and controls
47 lines (39 loc) · 1.26 KB
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
# https://stackoverflow.com/questions/2483182/recursive-wildcards-in-gnu-make
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))
IS_TESTDATA = $(findstring -testdata,${CURDIR})
SETUP_PY = $(shell find . -name "setup.py")
update-dependencies:
@echo "\033[0;31mPlease update dependencies for python manually!!\033[0m"
.PHONY: update-dependencies
pre-release: update-version update-dependencies clean default
.PHONY: pre-release
update-version:
ifdef NEW_VERSION
ifneq (,$(SETUP_PY))
sed -i \
-e "s/\(version *= *\"\)[0-9]*\.[0-9]*\.[0-9]*\(\"\)/\1$(NEW_VERSION)\2/" \
"setup.py"
endif
else
@echo -e "\033[0;31mNEW_VERSION is not defined. Can't update version :-(\033[0m"
exit 1
endif
.PHONY: update-version
publish:
ifeq ($(IS_TESTDATA),-testdata)
# no-op
else
python2 setup.py sdist
python2 -m twine upload dist/*
endif
.PHONY: publish
post-release:
@echo "No post-release needed for python"
.PHONY: post-release
### COMMON stuff for all platforms
BERP_VERSION = 1.3.0
BERP_GRAMMAR = gherkin.berp
define berp-generate-parser =
-! dotnet tool list --tool-path /usr/bin | grep "berp\s*$(BERP_VERSION)" && dotnet tool update Berp --version $(BERP_VERSION) --tool-path /usr/bin
berp -g $(BERP_GRAMMAR) -t $< -o $@ --noBOM
endef