1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-03 13:11:48 +02:00

added version to default name_template

refs #239
This commit is contained in:
Carlos Alexandro Becker 2017-05-19 23:37:51 -03:00
parent 4e896b9c8d
commit cdafdc785a
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
3 changed files with 3 additions and 2 deletions

View File

@ -259,7 +259,7 @@ archive:
# - Os
# - Arch
# - Arm (ARM version)
# The default is `{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
# The default is `{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
name_template: "{{.Binary}}_{{.Version}}_{{.Os}}_{{.Arch}}"
# Archive format. Valid options are `tar.gz` and `zip`.

View File

@ -13,6 +13,7 @@ build:
- arm
- arm64
archive:
name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Darwin
linux: Linux

View File

@ -9,7 +9,7 @@ import (
)
// NameTemplate default name_template for the archive.
const NameTemplate = "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
const NameTemplate = "{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
// SnapshotNameTemplate represents the default format for snapshot release names.
const SnapshotNameTemplate = "SNAPSHOT-{{ .Commit }}"