build: Set snap grade to "stable" for releases

This commit is contained in:
Jakob Borg 2016-11-12 09:43:12 +01:00
parent 72538e350d
commit 2860813a8e
2 changed files with 8 additions and 2 deletions

View File

@ -546,9 +546,15 @@ func buildSnap(target target) {
if strings.HasPrefix(snapver, "v") {
snapver = snapver[1:]
}
snapgrade := "devel"
if matched, _ := regexp.MatchString(`^\d+\.\d+\.\d+$`, snapver); matched {
snapgrade = "stable"
}
err = tmpl.Execute(f, map[string]string{
"Version": snapver,
"Architecture": snaparch})
"Architecture": snaparch,
"Grade": snapgrade,
})
if err != nil {
log.Fatal(err)
}

View File

@ -8,7 +8,7 @@ description: |
it's transmitted over the Internet.
architectures: [{{.Architecture}}]
grade: devel
grade: {{.Grade}}
confinement: strict
apps: