Simplify Go installation and support standard OpenCode releases

This commit is contained in:
2026-10-08 23:17:38 +01:00
parent 0f30a001c2
commit accbe63e39
101 changed files with 1331 additions and 682 deletions
+6 -6
View File
@@ -11,11 +11,11 @@ import (
"strings"
"testing"
"pipelines/internal/cli"
"pipelines/internal/draft"
"pipelines/internal/pipeline"
"pipelines/internal/protocol"
"pipelines/internal/server"
"git.a-wan.net/alan/pipelines/internal/cli"
"git.a-wan.net/alan/pipelines/internal/draft"
"git.a-wan.net/alan/pipelines/internal/pipeline"
"git.a-wan.net/alan/pipelines/internal/protocol"
"git.a-wan.net/alan/pipelines/internal/server"
)
func setup(t *testing.T) (func(...string) (string, error), *pipeline.Store, string) {
@@ -145,7 +145,7 @@ func TestCLIAuthorOpenCodeGetsScopedSkillAndLeavesDraft(t *testing.T) {
root := t.TempDir()
capture := filepath.Join(root, "invocation")
script := filepath.Join(root, "opencode")
os.WriteFile(script, []byte("#!/bin/sh\nif [ \"$1\" = api ]; then\n if [ \"$3\" = /api/session ]; then printf '%s' '{\"data\":{\"id\":\"ses_test\"}}'; fi\n exit 0\nfi\nprintf '%s\\n' \"$@\" > "+"'"+capture+"'"+"\n"), 0700)
os.WriteFile(script, []byte("#!/bin/sh\nif [ \"$1\" = --help ]; then printf '%s\\n' ' api commands'; exit 0; fi\nif [ \"$1\" = api ]; then\n if [ \"$3\" = /api/session ]; then printf '%s' '{\"data\":{\"id\":\"ses_test\"}}'; fi\n exit 0\nfi\nprintf '%s\\n' \"$@\" > "+"'"+capture+"'"+"\n"), 0700)
if _, err := run("new", "scoped skill", "Make a digest", "--opencode", script); err != nil {
t.Fatal(err)
}