build: Build snaps for ARM

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3717
This commit is contained in:
Leo Arias 2016-11-09 00:52:33 +00:00 committed by Jakob Borg
parent ae4cc94a9d
commit afd15392b1
3 changed files with 16 additions and 2 deletions

View File

@ -526,6 +526,8 @@ func buildDeb(target target) {
}
func buildSnap(target target) {
os.RemoveAll("snap")
tmpl, err := template.ParseFiles("snapcraft.yaml.template")
if err != nil {
log.Fatal(err)
@ -535,7 +537,17 @@ func buildSnap(target target) {
if err != nil {
log.Fatal(err)
}
err = tmpl.Execute(f, map[string]string{"Version": version})
snaparch := goarch
if snaparch == "armhf" {
goarch = "arm"
}
err = tmpl.Execute(f, map[string]string{
"Version": version,
"Architecture": snaparch})
if err != nil {
log.Fatal(err)
}
runPrint("snapcraft", "clean")
build(target, []string{"noupgrade"})
runPrint("snapcraft")

View File

@ -51,6 +51,7 @@ go run build.go -goarch armhf deb
mv *.deb "$WORKSPACE"
go run build.go -goarch amd64 snap
go run build.go -goarch armhf snap
go run build.go -goarch arm64 snap
mv *.snap "$WORKSPACE"

View File

@ -6,6 +6,7 @@ description: |
trustworthy and decentralized. Your data is your data alone and you deserve
to choose where it is stored, if it is shared with some third party and how
it's transmitted over the Internet.
architectures: [{{.Architecture}}]
grade: devel
confinement: strict