mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-07 22:38:26 +00:00
build: Build snaps for ARM
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3717
This commit is contained in:
parent
ae4cc94a9d
commit
afd15392b1
14
build.go
14
build.go
@ -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")
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user