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 <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2023-12-24 20:05:24 +08:00
parent 7e0d4951b9
commit e5bd02fd8e
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -28,3 +28,4 @@ coverage.txt
dist dist
.cover .cover
release release
bin
+1 -1
View File
@@ -81,7 +81,7 @@ install: $(GOFILES)
build: $(EXECUTABLE) build: $(EXECUTABLE)
$(EXECUTABLE): $(GOFILES) $(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: 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) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -a -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)' -o release/linux/amd64/$(DEPLOY_IMAGE)