mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add boringcrypto builds for linux (#9528)
* feat: add boringcrypto builds for linux Signed-off-by: Spike Curtis <spike@coder.com> * strip debug symbols, add BoringCryto to buildinfo Signed-off-by: Spike Curtis <spike@coder.com> * Fix TestVersion Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
+15
-10
@@ -13,11 +13,12 @@ import (
|
||||
// versionInfo wraps the stuff we get from buildinfo so that it's
|
||||
// easier to emit in different formats.
|
||||
type versionInfo struct {
|
||||
Version string `json:"version"`
|
||||
BuildTime time.Time `json:"build_time"`
|
||||
ExternalURL string `json:"external_url"`
|
||||
Slim bool `json:"slim"`
|
||||
AGPL bool `json:"agpl"`
|
||||
Version string `json:"version"`
|
||||
BuildTime time.Time `json:"build_time"`
|
||||
ExternalURL string `json:"external_url"`
|
||||
Slim bool `json:"slim"`
|
||||
AGPL bool `json:"agpl"`
|
||||
BoringCrypto bool `json:"boring_crypto"`
|
||||
}
|
||||
|
||||
// String() implements Stringer
|
||||
@@ -28,6 +29,9 @@ func (vi versionInfo) String() string {
|
||||
_, _ = str.WriteString("(AGPL) ")
|
||||
}
|
||||
_, _ = str.WriteString(vi.Version)
|
||||
if vi.BoringCrypto {
|
||||
_, _ = str.WriteString(" BoringCrypto")
|
||||
}
|
||||
|
||||
if !vi.BuildTime.IsZero() {
|
||||
_, _ = str.WriteString(" " + vi.BuildTime.Format(time.UnixDate))
|
||||
@@ -45,11 +49,12 @@ func (vi versionInfo) String() string {
|
||||
func defaultVersionInfo() *versionInfo {
|
||||
buildTime, _ := buildinfo.Time()
|
||||
return &versionInfo{
|
||||
Version: buildinfo.Version(),
|
||||
BuildTime: buildTime,
|
||||
ExternalURL: buildinfo.ExternalURL(),
|
||||
Slim: buildinfo.IsSlim(),
|
||||
AGPL: buildinfo.IsAGPL(),
|
||||
Version: buildinfo.Version(),
|
||||
BuildTime: buildTime,
|
||||
ExternalURL: buildinfo.ExternalURL(),
|
||||
Slim: buildinfo.IsSlim(),
|
||||
AGPL: buildinfo.IsAGPL(),
|
||||
BoringCrypto: buildinfo.IsBoringCrypto(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -34,7 +34,8 @@ Full build of Coder, supports the [40m [0m[91;40mserver[0m[40m [0m subcomm
|
||||
"build_time": "0001-01-01T00:00:00Z",
|
||||
"external_url": "https://github.com/coder/coder",
|
||||
"slim": false,
|
||||
"agpl": false
|
||||
"agpl": false,
|
||||
"boring_crypto": false
|
||||
}
|
||||
`
|
||||
for _, tt := range []struct {
|
||||
|
||||
Reference in New Issue
Block a user