File tree Expand file tree Collapse file tree 5 files changed +64
-0
lines changed
Expand file tree Collapse file tree 5 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 11.idea
22download
3+ dist
34main
45toolbox *
Original file line number Diff line number Diff line change 1+ # This is an example goreleaser.yaml file with some sane defaults.
2+ # Make sure to check the documentation at http://goreleaser.com
3+ builds :
4+ - env :
5+ - CGO_ENABLED=0
6+ ldflags :
7+ - -s -w -X github.com/bakito/toolbox/version.Version={{.Version}}
8+ goos :
9+ - linux
10+ - windows
11+ # - darwin
12+ goarch :
13+ # - 386
14+ - amd64
15+ hooks :
16+ post : upx {{ .Path }}
17+ checksum :
18+ name_template : ' checksums.txt'
19+ snapshot :
20+ name_template : " {{ .Tag }}-next"
21+ changelog :
22+ sort : asc
23+ filters :
24+ exclude :
25+ - ' ^docs:'
26+ - ' ^test:'
Original file line number Diff line number Diff line change 1+ # Run go fmt against code
2+ fmt :
3+ go fmt ./...
4+ gofmt -s -w .
5+
6+ # Run go vet against code
7+ vet :
8+ go vet ./...
9+
10+ # Run go mod tidy
11+ tidy :
12+ go mod tidy
13+
14+ # Run tests
15+ test : tidy fmt vet
16+ go test ./... -coverprofile=coverage.out
17+ go tool cover -func=coverage.out
18+
19+ release : semver
20+ @version=$$(semver ) ; \
21+ git tag -s $$ version -m" Release $$ version"
22+ goreleaser --rm-dist
23+
24+ test-release :
25+ goreleaser --skip-publish --snapshot --rm-dist
26+
27+ semver :
28+ ifeq (, $(shell which semver) )
29+ $(shell go install github.com/bakito/semver@latest)
30+ endif
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package main
33import (
44 "bytes"
55 "fmt"
6+ "github.com/bakito/toolbox/version"
67 "log"
78 "os"
89 "path/filepath"
2930
3031func main () {
3132
33+ log .Printf ("toolbox v%s" , version .Version )
34+
3235 tb , err := readToolbox ()
3336 if err != nil {
3437 panic (err )
Original file line number Diff line number Diff line change 1+ package version
2+
3+ // Version the module version
4+ var Version = "devel"
You can’t perform that action at this time.
0 commit comments