-
Notifications
You must be signed in to change notification settings - Fork 351
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
build: cleanup Makefile #2461
build: cleanup Makefile #2461
Conversation
AlexanderYastrebov
commented
Jul 15, 2023
- remove unnecessary bin target
- remove bin directory during clean
- fix typo
- do not clean entire go build cache (see cmd/go: go clean should not accept flags like -modcache with packages golang/go#53725)
@@ -112,11 +108,12 @@ lint: build staticcheck ## run all linters | |||
|
|||
.PHONY: clean | |||
clean: ## clean temporary files and directories | |||
go clean -i -cache -testcache |
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.
-cache or -testcache flags remove entire go build cache.
golang/go#53725 added warning about it which we silenced in #2217
* remove unnecessary bin target * remove bin directory during clean * fix typo * do not clean entire go build cache (see golang/go#53725) Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
0bb2948
to
ff26924
Compare
👍 |
1 similar comment
👍 |
@@ -22,25 +22,21 @@ help: ## Display this help | |||
lib: $(SOURCES) ## build skipper library | |||
go build ./... | |||
|
|||
.PHONY: bindir | |||
bindir: | |||
mkdir -p bin |
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.
That's not so great because it breaks the build for new contributors
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.
No, bin is created by go build automatically (try e.g. make clean skipper
)