Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 97cf6de

Browse files
author
Sameer Naik
committed
makefile: fix clean job to remove .exe builds
1 parent 111e545 commit 97cf6de

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ image: ## Builds the container image
6868
$(DOCKER) build . -t $(IMAGE) --build-arg GIT_TAG=$(GIT_TAG)
6969

7070
clean: ## Clean build artifacts
71-
$(RM) -rf $(PACKAGE)
72-
$(RM) -rf $(PACKAGE)-unit-tests.xml
73-
$(RM) -rf c.out $(PACKAGE)-coverage.html
74-
@for platform in $(TARGETS); do $(RM) -rf $(DIST_DIR)$(PACKAGE)-$${platform%/*}-$${platform#*/}; done
71+
@$(RM) -v $(PACKAGE)
72+
@$(RM) -v $(PACKAGE)-unit-tests.xml
73+
@$(RM) -v c.out $(PACKAGE)-coverage.html
74+
@for platform in $(TARGETS); do \
75+
GOOS=$${platform%/*} ; \
76+
GOARCH=$${platform#*/} ; \
77+
RELEASE_BINARY=$(PACKAGE)-$${GOOS}-$${GOARCH} ; \
78+
[ $${GOOS} = "windows" ] && RELEASE_BINARY=$${RELEASE_BINARY}.exe ; \
79+
$(RM) -v $(DIST_DIR)$${RELEASE_BINARY}; \
80+
done

0 commit comments

Comments
 (0)