1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-01-12 01:22:30 +02:00

Fix goreleaser config (hopefully).

This commit is contained in:
Alec Thomas 2017-09-25 18:14:24 +10:00
parent a75ba5dc2c
commit 2181aa5f70
2 changed files with 10 additions and 4 deletions

View File

@ -15,12 +15,12 @@ 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
@ -28,4 +28,4 @@ archive:
snapshot:
name_template: SNAPSHOT-{{ .Commit }}
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'

View File

@ -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()
@ -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.