mirror of
https://github.com/restic/restic.git
synced 2025-01-03 05:35:43 +00:00
Detect a devel version correctly in LDFlags()
This commit is contained in:
parent
c7f5ac22eb
commit
d2834b61fb
1 changed files with 1 additions and 1 deletions
2
build.go
2
build.go
|
@ -265,7 +265,7 @@ func (cs Constants) LDFlags() string {
|
||||||
l := make([]string, 0, len(cs))
|
l := make([]string, 0, len(cs))
|
||||||
|
|
||||||
v := runtime.Version()
|
v := runtime.Version()
|
||||||
if strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") || strings.HasPrefix(v, "go1.7") {
|
if strings.HasPrefix(v, "devel") || strings.HasPrefix(v, "go1.5") || strings.HasPrefix(v, "go1.6") || strings.HasPrefix(v, "go1.7") {
|
||||||
for k, v := range cs {
|
for k, v := range cs {
|
||||||
l = append(l, fmt.Sprintf(`-X "%s=%s"`, k, v))
|
l = append(l, fmt.Sprintf(`-X "%s=%s"`, k, v))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue