release/dist/qnap: add qnap target builder
Creates new QNAP builder target, which builds go binaries then uses docker to build into QNAP packages. Much of the docker/script code here is pulled over from https://github.com/tailscale/tailscale-qpkg, with adaptation into our builder structures. The qnap/Tailscale folder contains static resources needed to build Tailscale qpkg packages, and is an exact copy of the existing folder in the tailscale-qpkg repo. Builds can be run with: ``` sudo ./tool/go run ./cmd/dist build qnap ``` Updates tailscale/tailscale-qpkg#135 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
This commit is contained in:
committed by
Sonia Appasamy
parent
b743b85dad
commit
0a84215036
Vendored
+75
@@ -0,0 +1,75 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
package qnap
|
||||
|
||||
import "tailscale.com/release/dist"
|
||||
|
||||
// Targets defines the dist.Targets for QNAP devices.
|
||||
//
|
||||
// If privateKeyPath and certificatePath are both provided non-empty,
|
||||
// these targets will be signed for QNAP app store release with built.
|
||||
func Targets(privateKeyPath, certificatePath string) []dist.Target {
|
||||
var signerInfo *signer
|
||||
if privateKeyPath != "" && certificatePath != "" {
|
||||
signerInfo = &signer{privateKeyPath, certificatePath}
|
||||
}
|
||||
return []dist.Target{
|
||||
&target{
|
||||
arch: "x86",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "386",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
&target{
|
||||
arch: "x86_ce53xx",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "386",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
&target{
|
||||
arch: "x86_64",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "amd64",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
&target{
|
||||
arch: "arm-x31",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "arm",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
&target{
|
||||
arch: "arm-x41",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "arm",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
&target{
|
||||
arch: "arm-x19",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "arm",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
&target{
|
||||
arch: "arm_64",
|
||||
goenv: map[string]string{
|
||||
"GOOS": "linux",
|
||||
"GOARCH": "arm64",
|
||||
},
|
||||
signer: signerInfo,
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user