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:
parent
a75ba5dc2c
commit
2181aa5f70
@ -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'
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user