forked from strimzi/strimzi-kafka-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (64 loc) · 2.33 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
include ./Makefile.os
include ./Makefile.docker
include ./Makefile.maven
PROJECT_NAME ?= kafka-bridge
GITHUB_VERSION ?= main
RELEASE_VERSION ?= latest
ifneq ($(RELEASE_VERSION),latest)
GITHUB_VERSION = $(RELEASE_VERSION)
endif
.PHONY: all
all: java_package docker_build docker_push
.PHONY: clean
clean: java_clean
.PHONY: release
release: release_prepare release_maven release_package
.PHONY: next_version
next_version:
echo $(shell echo $(NEXT_VERSION) | tr a-z A-Z) > release.version
mvn versions:set -DnewVersion=$(shell echo $(NEXT_VERSION) | tr a-z A-Z)
mvn versions:commit
.PHONY: release_prepare
release_prepare:
echo "Update release.version to $(RELEASE_VERSION)"
echo $(shell echo $(RELEASE_VERSION) | tr a-z A-Z) > release.version
echo "Update pom versions to $(RELEASE_VERSION)"
mvn versions:set -DnewVersion=$(shell echo $(RELEASE_VERSION) | tr a-z A-Z)
mvn versions:commit
.PHONY: release_maven
release_maven:
echo "Update pom versions to $(RELEASE_VERSION)"
mvn versions:set -DnewVersion=$(shell echo $(RELEASE_VERSION) | tr a-z A-Z)
mvn versions:commit
.PHONY: release_package
release_package: java_package
##########
# Documentation targets
##########
.PHONY: docu_html
docu_html: docu_htmlclean docu_check
mkdir -p documentation/html
$(CP) -vrL documentation/book/images documentation/html/images
asciidoctor -v --failure-level WARN -t -dbook -a ProductVersion=$(RELEASE_VERSION) documentation/book/bridge.adoc -o documentation/html/bridge.html
.PHONY: docu_htmlnoheader
docu_htmlnoheader: docu_htmlnoheaderclean docu_check
mkdir -p documentation/htmlnoheader
$(CP) -vrL documentation/book/images documentation/htmlnoheader/images
asciidoctor -v --failure-level WARN -t -dbook -a ProductVersion=$(RELEASE_VERSION) -s documentation/book/bridge.adoc -o documentation/htmlnoheader/bridge.html
.PHONY: docu_api
docu_api:
mvn -P apidoc io.github.swagger2markup:swagger2markup-maven-plugin:convertSwagger2markup@generate-apidoc
.PHONY: docu_check
docu_check: docu_api
./.azure/scripts/check_docs.sh
.PHONY: docu_clean
docu_clean: docu_htmlclean docu_htmlnoheaderclean
.PHONY: docu_htmlclean
docu_htmlclean:
rm -rf documentation/html
.PHONY: docu_htmlnoheaderclean
docu_htmlnoheaderclean:
rm -rf documentation/htmlnoheader
.PHONY: docu_pushtowebsite
docu_pushtowebsite: docu_htmlnoheader docu_html
./.azure/scripts/docu-push-to-website.sh