make docker build enabled by default

This commit is contained in:
Siyuan 2025-09-26 13:08:16 +00:00
parent 713becd53d
commit c166602481
3 changed files with 19 additions and 9 deletions

View File

@ -111,3 +111,8 @@ func (n *Native) DoNotUseThisIsForCrashTestingOnly() {
crash()
}
// GetLVGLVersion returns the LVGL version
func GetLVGLVersion() string {
return uiGetLVGLVersion()
}

View File

@ -16,6 +16,7 @@ show_help() {
echo " --run-go-tests-only Run go tests and exit"
echo " --skip-ui-build Skip frontend/UI build"
echo " --skip-native-build Skip native build"
echo " --disable-docker Disable docker build"
echo " -i, --install Build for release and install the app"
echo " --help Display this help message"
echo
@ -36,7 +37,7 @@ LOG_TRACE_SCOPES="${LOG_TRACE_SCOPES:-jetkvm,cloud,websocket,native,jsonrpc}"
RUN_GO_TESTS=false
RUN_GO_TESTS_ONLY=false
INSTALL_APP=false
BUILD_IN_DOCKER=false
BUILD_IN_DOCKER=true
DOCKER_BUILD_DEBUG=false
DOCKER_BUILD_TAG=ghcr.io/jetkvm/buildkit:latest
@ -63,8 +64,8 @@ while [[ $# -gt 0 ]]; do
RESET_USB_HID_DEVICE=true
shift
;;
--build-in-docker)
BUILD_IN_DOCKER=true
--disable-docker)
BUILD_IN_DOCKER=false
shift
;;
--docker-build-debug)

View File

@ -5,7 +5,9 @@ import (
"encoding/json"
"html/template"
"runtime"
"strings"
"github.com/jetkvm/kvm/internal/native"
"github.com/prometheus/common/version"
)
@ -32,11 +34,9 @@ func GetVersionData(isJson bool) ([]byte, error) {
"platform": runtime.GOOS + "/" + runtime.GOARCH,
}
if nativeInstance != nil {
lvglVersion, err := nativeInstance.GetLVGLVersion()
if err == nil {
m["lvglVersion"] = lvglVersion
}
lvglVersion := native.GetLVGLVersion()
if lvglVersion != "" {
m["lvglVersion"] = lvglVersion
}
if isJson {
@ -47,7 +47,11 @@ func GetVersionData(isJson bool) ([]byte, error) {
return jsonData, nil
}
t := template.Must(template.New("version").Parse(versionInfoTmpl))
t := template.Must(
template.New("version").Parse(
strings.TrimSpace(versionInfoTmpl),
),
)
var buf bytes.Buffer
if err := t.ExecuteTemplate(&buf, "version", m); err != nil {