build: update Go formatting and GitHub actions configuration

- Remove `DIST` variable definition
- Update the `GOFMT` definition by removing the `-s` flag
- Install `gofumpt` latest version instead of an unspecified version

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy
2025-04-12 09:37:03 +08:00
parent 1b1fb67645
commit 9f96bb575e
+2 -3
View File
@@ -1,6 +1,5 @@
DIST := dist
EXECUTABLE := drone-discord
GOFMT ?= gofumpt -l -s -w
GOFMT ?= gofumpt -l -w
GO ?= go
GOFILES := $(shell find . -name "*.go" -type f)
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
@@ -43,7 +42,7 @@ all: build
fmt:
@hash gofumpt > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) install mvdan.cc/gofumpt; \
$(GO) install mvdan.cc/gofumpt@latest; \
fi
$(GOFMT) -w $(GOFILES)