Skip to content

Commit f5840fe

Browse files
committed
make docker build enabled by default
1 parent 713becd commit f5840fe

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

internal/native/native.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,8 @@ func (n *Native) DoNotUseThisIsForCrashTestingOnly() {
111111

112112
crash()
113113
}
114+
115+
// GetLVGLVersion returns the LVGL version
116+
func GetLVGLVersion() string {
117+
return uiGetLVGLVersion()
118+
}

scripts/dev_deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LOG_TRACE_SCOPES="${LOG_TRACE_SCOPES:-jetkvm,cloud,websocket,native,jsonrpc}"
3636
RUN_GO_TESTS=false
3737
RUN_GO_TESTS_ONLY=false
3838
INSTALL_APP=false
39-
BUILD_IN_DOCKER=false
39+
BUILD_IN_DOCKER=true
4040
DOCKER_BUILD_DEBUG=false
4141
DOCKER_BUILD_TAG=ghcr.io/jetkvm/buildkit:latest
4242

@@ -63,8 +63,8 @@ while [[ $# -gt 0 ]]; do
6363
RESET_USB_HID_DEVICE=true
6464
shift
6565
;;
66-
--build-in-docker)
67-
BUILD_IN_DOCKER=true
66+
--disable-docker)
67+
BUILD_IN_DOCKER=false
6868
shift
6969
;;
7070
--docker-build-debug)

version.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import (
55
"encoding/json"
66
"html/template"
77
"runtime"
8+
"strings"
89

10+
"github.com/jetkvm/kvm/internal/native"
911
"github.com/prometheus/common/version"
1012
)
1113

@@ -32,11 +34,9 @@ func GetVersionData(isJson bool) ([]byte, error) {
3234
"platform": runtime.GOOS + "/" + runtime.GOARCH,
3335
}
3436

35-
if nativeInstance != nil {
36-
lvglVersion, err := nativeInstance.GetLVGLVersion()
37-
if err == nil {
38-
m["lvglVersion"] = lvglVersion
39-
}
37+
lvglVersion := native.GetLVGLVersion()
38+
if lvglVersion != "" {
39+
m["lvglVersion"] = lvglVersion
4040
}
4141

4242
if isJson {
@@ -47,7 +47,11 @@ func GetVersionData(isJson bool) ([]byte, error) {
4747
return jsonData, nil
4848
}
4949

50-
t := template.Must(template.New("version").Parse(versionInfoTmpl))
50+
t := template.Must(
51+
template.New("version").Parse(
52+
strings.TrimSpace(versionInfoTmpl),
53+
),
54+
)
5155

5256
var buf bytes.Buffer
5357
if err := t.ExecuteTemplate(&buf, "version", m); err != nil {

0 commit comments

Comments
 (0)