-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from noborus/version-flags
Add version and help flag using cobra
- Loading branch information
Showing
6 changed files
with
273 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ | |
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
vendor/ | ||
mdviewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- go mod vendor | ||
builds: | ||
- | ||
id: mdviewer-linux | ||
binary: mdviewer | ||
ldflags: | ||
- -X main.Version={{.Version}} | ||
- -X main.Revision={{.ShortCommit}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- | ||
id: mdviewer-other | ||
binary: mdviewer | ||
ldflags: | ||
- -X main.Version={{.Version}} | ||
- -X main.Revision={{.ShortCommit}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
- windows | ||
- freebsd | ||
goarch: | ||
- '386' | ||
- amd64 | ||
- arm | ||
- arm64 | ||
|
||
archives: | ||
- | ||
id: mdviewer-archives | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
builds: | ||
- mdviewer-linux | ||
- mdviewer-other | ||
files: | ||
- LICENSE | ||
- README.md | ||
format: zip | ||
|
||
nfpms: | ||
- | ||
id: mdviewer-nfpms | ||
file_name_template: "{{ .ProjectName }}_{{ .Version }}-1_{{ .Arch }}" | ||
builds: | ||
- mdviewer-linux | ||
homepage: https://github.com/noborus/mdviewer | ||
maintainer: Noboru Saito <[email protected]> | ||
description: "markdown viewer" | ||
license: MIT | ||
formats: | ||
- deb | ||
- rpm | ||
bindir: /usr/bin | ||
|
||
brews: | ||
- | ||
name: mdviewer | ||
repository: | ||
owner: noborus | ||
name: homebrew-tap | ||
token: "{{ .Env.TAP_GITHUB_TOKEN }}" | ||
commit_author: | ||
name: noborus | ||
email: [email protected] | ||
homepage: https://github.com/noborus/mdviewer | ||
description: "markdown viewer" | ||
test: | ||
system "#{bin}/mdviewer --version" | ||
install: | ||
bin.install "mdviewer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.