-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added and tweaked the method of reporting makefile targets #1277
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1277 +/- ##
===========================================
+ Coverage 26.25% 53.53% +27.27%
===========================================
Files 263 289 +26
Lines 18947 20851 +1904
===========================================
+ Hits 4975 11163 +6188
+ Misses 13201 7939 -5262
- Partials 771 1749 +978
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@printf "%-30s %s\n" "Target" "Description" | ||
@printf "%-30s %s\n" "------" "-----------" | ||
@make -pqR : 2>/dev/null \ | ||
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems this only work when the locale is C
(and maybe other English locales).
$ env LANG=zh_CN.UTF-8 make targets
Target Description
------ -----------
$ env LANG=C make targets
Target Description
------ -----------
bench build the tiup-bench component
build build tiup and all it's components
build_integration_test run the playground, cluster, and dm integration tests.
build_tiup_cluster_test run the tiup-cluster tests
build_tiup_dm_test run the tiup-dm tests
build_tiup_playground_test run the tiup-playground tests
build_tiup_test run the tiup tests
check run all checkers. (fmt, lint, tidy, check-static and vet)
check-static run the golangci-lint static check tool
clean run the build cleanup steps
client build the tiup-client component
cluster build the tiup-cluster component
components build the playground, client, cluster, dm, bench and server components
ctl build the tiup-ctl component
default run the checks and then build.
dm build the tiup-dm component
doc build the tiup-doc component
errdoc build the tiup-errdoc component
failpoint-disable disable failpoint
failpoint-enable enable failpoint
fmt run the go formatter utility
lint run the lint checker revive
playground build tiup-playground component
race run race check with failpoint enabled
run-tests run the unit tests
server build the tiup-server component
test run tests with failpoint enabled
tidy run tidy check
tiup build the tiup driver
tools/bin/failpoint-ctl build the failpoint-ctl utility
tools/bin/golangci-lint pull in specific version of golangci-lint (v1.38.0)
tools/bin/revive build revive utility
unit-test run the code coverage test phase
vet run the go vet tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went a quick test and can confirms that adding an LANG=C
line just above the targets
target would do the trick.
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 97a08d9
|
Added a target into the make file to be able to report available targets within the makefile. This was a tweak of something I saw on - https://stackoverflow.com/questions/4219255/how-do-you-get-the-list-of-targets-in-a-makefile
This help us by documenting known targets.