build: Set snap grade to "stable" for releases
This commit is contained in:
parent
72538e350d
commit
2860813a8e
8
build.go
8
build.go
@ -546,9 +546,15 @@ func buildSnap(target target) {
|
|||||||
if strings.HasPrefix(snapver, "v") {
|
if strings.HasPrefix(snapver, "v") {
|
||||||
snapver = snapver[1:]
|
snapver = snapver[1:]
|
||||||
}
|
}
|
||||||
|
snapgrade := "devel"
|
||||||
|
if matched, _ := regexp.MatchString(`^\d+\.\d+\.\d+$`, snapver); matched {
|
||||||
|
snapgrade = "stable"
|
||||||
|
}
|
||||||
err = tmpl.Execute(f, map[string]string{
|
err = tmpl.Execute(f, map[string]string{
|
||||||
"Version": snapver,
|
"Version": snapver,
|
||||||
"Architecture": snaparch})
|
"Architecture": snaparch,
|
||||||
|
"Grade": snapgrade,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@ description: |
|
|||||||
it's transmitted over the Internet.
|
it's transmitted over the Internet.
|
||||||
architectures: [{{.Architecture}}]
|
architectures: [{{.Architecture}}]
|
||||||
|
|
||||||
grade: devel
|
grade: {{.Grade}}
|
||||||
confinement: strict
|
confinement: strict
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user