Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ jobs:
- name: Build
run: go build -v .

- name: Run goreleaser in snapshot mode
if: success() && ! startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --snapshot

# - name: Upload assets for snapshots
# if: success() && ! startsWith(github.ref, 'refs/tags/v')
# uses: actions/upload-artifact@v2
# with:
# name: check_cloud_gcp
# path: dist/*

- name: Run goreleaser in release mode
if: success() && startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v2
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: test coverage lint vet

build:
go build
goreleaser:
goreleaser release --snapshot --rm-dis
lint:
go fmt $(go list ./... | grep -v /vendor/)
vet:
go vet $(go list ./... | grep -v /vendor/)
test:
go test -v -cover ./...
coverage:
go test -v -cover -coverprofile=coverage.out ./... &&\
go tool cover -html=coverage.out -o coverage.html
7 changes: 4 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (

// nolint: gochecknoglobals
var (
version = "0.1.0"
commit = ""
date = ""
// These get filled at build time with the proper vaules
version = "development"
commit = "HEAD"
date = "latest"
)

func main() {
Expand Down