Skip to content

Commit

Permalink
Add build task
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuoza committed Nov 13, 2021
1 parent d9dcb41 commit 7ccf565
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ jobs:
- name: lint
run: make lint

- name: go test
- name: test
run: make test

- name: build
run: make build
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ jobs:
- name: lint
run: make lint

- name: go test
- name: test
run: make test

- name: build
run: make build
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ install:
go install honnef.co/go/tools/cmd/staticcheck@2021.1.1
go mod download

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

.PHONY: clean
clean:
Expand Down

0 comments on commit 7ccf565

Please sign in to comment.