Skip to content

Commit

Permalink
Fix goreleaser config (hopefully).
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Sep 25, 2017
1 parent a75ba5d commit 2181aa5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .goreleaser.yml
Expand Up @@ -15,17 +15,17 @@ builds:
- "386"
goarm:
- "6"
main: .
main: ./cmd/chroma/main.go
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
binary: cmd/chroma
binary: chroma
archive:
format: tar.gz
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{
name_template: '{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{
.Arm }}{{ end }}'
files:
- COPYING
- README*
snapshot:
name_template: SNAPSHOT-{{ .Commit }}
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
6 changes: 6 additions & 0 deletions cmd/chroma/main.go
Expand Up @@ -25,6 +25,11 @@ import (
)

var (
// Populated by goreleaser.
version = "?"
commit = "?"
date = "?"

profileFlag = kingpin.Flag("profile", "Enable profiling to file.").Hidden().String()
listFlag = kingpin.Flag("list", "List lexers, styles and formatters.").Bool()
unbufferedFlag = kingpin.Flag("unbuffered", "Do not buffer output.").Bool()
Expand Down Expand Up @@ -59,6 +64,7 @@ type nopFlushableWriter struct{ io.Writer }
func (n *nopFlushableWriter) Flush() error { return nil }

func main() {
kingpin.CommandLine.Version(fmt.Sprintf("%s-%s-%s", version, commit, date))
kingpin.CommandLine.Help = `
Chroma is a general purpose syntax highlighting library and corresponding
command, for Go.
Expand Down

0 comments on commit 2181aa5

Please sign in to comment.