From e5bd02fd8eb28b3c2064afdfe37e3c409ba16323 Mon Sep 17 00:00:00 2001 From: appleboy Date: Sun, 24 Dec 2023 20:05:24 +0800 Subject: [PATCH] chore: update build process to output executables to `bin` directory - Add `bin` to the `.gitignore` file - Change the build command in the `Makefile` to output the executable to the `bin` directory Signed-off-by: appleboy --- .gitignore | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c08f47a..82cee85 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ coverage.txt dist .cover release +bin diff --git a/Makefile b/Makefile index d5b6454..fc306dc 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ install: $(GOFILES) build: $(EXECUTABLE) $(EXECUTABLE): $(GOFILES) - $(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o $@ + $(GO) build -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o bin/$@ build_linux_amd64: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/amd64/$(DEPLOY_IMAGE)