Skip to content

Commit

Permalink
Update build task
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuoza committed Nov 13, 2021
1 parent 40b1a5f commit eff62b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
GIT_VER := $(shell git describe --tags)
export GO111MODULE := on

GO111MODULE := on

GO_FILES := $(shell find . -type f -name '*.go' -print)

.PHONY: install
install:
go install honnef.co/go/tools/cmd/staticcheck@2021.1.1
go mod download

build: pkg/switchbot/**/*.go cmd/switchbot/**/*.go go.*
.PHONY: build
build: $(GO_FILES)
go build -trimpath -ldflags "-s -w -X main.Version=${GIT_VER}" -o tmp/switchbot cmd/switchbot/main.go

.PHONY: clean
Expand Down

0 comments on commit eff62b6

Please sign in to comment.