mirror of
https://github.com/appleboy/drone-discord.git
synced 2026-06-04 10:23:47 +08:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user