Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (54 loc) · 1.95 KB
/
Copy pathMakefile
File metadata and controls
64 lines (54 loc) · 1.95 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
VERSION ?= 13.0.0
WORKFLOW_FOLDER := .github/workflows
README_FILES := $(shell find . -path './.git' -prune -o -name README.md -print)
VERSION_REF_FILES := $(WORKFLOW_FOLDER)/*.y*ml $(README_FILES)
ifneq (,$(findstring xterm,${TERM}))
RED := $(shell tput -Txterm setaf 1)
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
LIGHTPURPLE := $(shell tput -Txterm setaf 4)
RESET := $(shell tput -Txterm sgr0)
else
RED := ""
GREEN := ""
YELLOW := ""
LIGHTPURPLE := ""
RESET := ""
endif
.PHONY: release-version
release-version:
@echo -e "${LIGHTPURPLE}+ make target: $@${RESET}"
sed -i -E \
-e "s%(getdevopspro/github-actions[^[:space:]\`\"'<>]*)@v[0-9A-Za-z._-]+%\1@v$(VERSION)%g" \
$(VERSION_REF_FILES)
git add $(VERSION_REF_FILES)
promote: release-version
@echo -e "${LIGHTPURPLE}+ make target: $@${RESET}"
git add Makefile
git commit -m "chore: bump version to v$(VERSION)" -m "[skip ci]"
git tag v$(VERSION)
git push origin HEAD v$(VERSION)
release: release-version promote
.PHONY: test-version
test-version:
python3 -B -m unittest discover -s tests -p 'test_release_version.py' -v
python3 -B -m unittest discover -s tests -p 'test_version_file.py' -v
.PHONY: test-changelog
test-changelog:
python3 -B -m unittest discover -s tests -p 'test_release_changelog.py' -v
.PHONY: test-report
test-report:
python3 -B -m unittest discover -s tests -p 'test_build_report.py' -v
node --test tests/test_build_report_comment.js tests/test_build_baseline.js
.PHONY: test-build-steps
test-build-steps:
python3 -B -m unittest discover -s tests -p 'test_build_steps.py' -v
.PHONY: test-build-checkout
test-build-checkout:
python3 -B -m unittest discover -s tests -p 'test_build_checkout.py' -v
.PHONY: test-all-green
test-all-green:
node --test tests/test_all_green.js
.PHONY: test-release-workflow
test-release-workflow:
python3 -B -m unittest discover -s tests -p 'test_release_workflow.py' -v