Fix CI build by embedding workspace templates from repo root

This commit is contained in:
野生派Coder~
2026-03-05 23:05:26 +08:00
parent 3894f0e27a
commit c1baf67ce6
3 changed files with 10 additions and 4 deletions

View File

@@ -7,7 +7,6 @@ import (
"path/filepath" "path/filepath"
"sort" "sort"
"strings" "strings"
"time"
"clawgo/pkg/nodes" "clawgo/pkg/nodes"
"clawgo/pkg/providers" "clawgo/pkg/providers"

View File

@@ -7,17 +7,16 @@
package main package main
import ( import (
"embed"
"errors" "errors"
"fmt" "fmt"
"os" "os"
"clawgo"
"clawgo/pkg/config" "clawgo/pkg/config"
"clawgo/pkg/logger" "clawgo/pkg/logger"
) )
//go:embed workspace var embeddedFiles = clawgo.EmbeddedWorkspace
var embeddedFiles embed.FS
var version = "0.1.0" var version = "0.1.0"
var buildTime = "unknown" var buildTime = "unknown"

8
workspace_embed.go Normal file
View File

@@ -0,0 +1,8 @@
package clawgo
import "embed"
// EmbeddedWorkspace bundles onboarding workspace templates into the binary.
//go:embed all:workspace
var EmbeddedWorkspace embed.FS