mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-01 19:38:29 +00:00
build: Snap versions should not have initial "v"
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3728
This commit is contained in:
parent
59f3d1445f
commit
72538e350d
10
build.go
10
build.go
@ -527,7 +527,7 @@ func buildDeb(target target) {
|
||||
|
||||
func buildSnap(target target) {
|
||||
os.RemoveAll("snap")
|
||||
|
||||
|
||||
tmpl, err := template.ParseFiles("snapcraft.yaml.template")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@ -541,9 +541,13 @@ func buildSnap(target target) {
|
||||
snaparch := goarch
|
||||
if snaparch == "armhf" {
|
||||
goarch = "arm"
|
||||
}
|
||||
}
|
||||
snapver := version
|
||||
if strings.HasPrefix(snapver, "v") {
|
||||
snapver = snapver[1:]
|
||||
}
|
||||
err = tmpl.Execute(f, map[string]string{
|
||||
"Version": version,
|
||||
"Version": snapver,
|
||||
"Architecture": snaparch})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user