File tree Expand file tree Collapse file tree 8 files changed +84
-83
lines changed
Expand file tree Collapse file tree 8 files changed +84
-83
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+ - name : Set up Go
20+ uses : actions/setup-go@v4
21+ with :
22+ go-version : stable
23+ - name : Run GoReleaser
24+ uses : goreleaser/goreleaser-action@v5
25+ with :
26+ distribution : goreleaser
27+ version : latest
28+ args : release --clean
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11bin /
22totp-cli
33coverage.out
4- .idea
4+ .idea
5+ dist /
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ issues:
6363 - text : " sig: func \\ (\\ *?github.com/yitsushi/totp-cli/"
6464 linters :
6565 - wrapcheck
66+ - path : internal/info
67+ linters :
68+ - gochecknoglobals
6669
6770linters :
6871 enable-all : true
Original file line number Diff line number Diff line change 1+ # vim: set ts=2 sw=2 tw=0 fo=cnqoj
2+ version : 1
3+
4+ before :
5+ hooks :
6+ - go mod download
7+
8+ builds :
9+ - env :
10+ - CGO_ENABLED=0
11+ goos :
12+ - linux
13+ - windows
14+ - darwin
15+ ldflags :
16+ - -s -w -X github.com/yitsushi/totp-cli/internal/info.Version={{.Version}} -X github.com/yitsushi/totp-cli/internal/info.Commit={{.Commit}}
17+
18+ archives :
19+ - format : tar.gz
20+ # this name template makes the OS and Arch compatible with the results of `uname`.
21+ name_template : >-
22+ {{ .ProjectName }}_
23+ {{- title .Os }}_
24+ {{- if eq .Arch "amd64" }}x86_64
25+ {{- else if eq .Arch "386" }}i386
26+ {{- else }}{{ .Arch }}{{ end }}
27+ {{- if .Arm }}v{{ .Arm }}{{ end }}
28+ # use zip for windows archives
29+ format_overrides :
30+ - goos : windows
31+ format : zip
32+
33+ changelog :
34+ sort : asc
35+ filters :
36+ exclude :
37+ - " ^docs:"
38+ - " ^test:"
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ func newApplication() *cli.App {
1414 stdErr := os .Stderr
1515
1616 return & cli.App {
17- Name : info .AppName ,
17+ Name : info .Name ,
1818 HelpName : "totp-cli" ,
1919 Usage : "Authy/Google Authenticator like TOTP CLI tool written in Go." ,
20- Version : info .AppVersion ,
20+ Version : info .Version ,
2121 Commands : []* cli.Command {
2222 cmd .AddTokenCommand (),
2323 cmd .ChangePasswordCommand (),
Original file line number Diff line number Diff line change 11package info
22
3- // AppRepoOwner defined the owner of the repo on GitHub.
4- const AppRepoOwner string = "yitsushi"
3+ // RepoOwner defined the owner of the repo on GitHub.
4+ const RepoOwner = "yitsushi"
55
6- // AppName defined the application name.
7- const AppName string = "totp-cli"
6+ // Name defined the application name.
7+ const Name = "totp-cli"
88
9- // AppVersion defined current version of this application.
10- const AppVersion string = "v1.8.5"
9+ // Version defined current version of this application.
10+ var Version = "dev"
11+
12+ // Commit defined commit hash of the current build.
13+ var Commit = "unknown"
You can’t perform that action at this time.
0 commit comments