mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
fix: reconcile documentation guarantees and enforcement (OM-15)
This commit is contained in:
1 parent
6c878ae79a
commit
dcb50b7e0f
28 files changed
+461
-128
No files matched your search
@@ -154,6 +154,19 @@ describe('OpenCode v2 contract', () => {
|
||||
}
|
||||
})
|
||||
|
||||
it('parses --version output through the shared release helper instead of a local parser', () => {
|
||||
const entrypoint = readFileSync(join(REPO_ROOT, 'scripts', 'docker-entrypoint.sh'), 'utf8')
|
||||
const setupDev = readFileSync(join(REPO_ROOT, 'scripts', 'setup-dev.sh'), 'utf8')
|
||||
const releaseHelper = readFileSync(join(REPO_ROOT, 'scripts', 'lib', 'opencode-release.sh'), 'utf8')
|
||||
expect(releaseHelper).toContain('parse_opencode_version_output()')
|
||||
expect(entrypoint).toContain('parse_opencode_version_output "$output"')
|
||||
expect(setupDev).toContain('OPENCODE_VERSION_OUTPUT="$(opencode --version 2>&1)" || OPENCODE_VERSION_OUTPUT=""')
|
||||
expect(setupDev).toContain('parse_opencode_version_output "$OPENCODE_VERSION_OUTPUT"')
|
||||
for (const script of [entrypoint, setupDev]) {
|
||||
expect(script).not.toContain("grep -oE '[0-9]")
|
||||
}
|
||||
})
|
||||
|
||||
it('never sets or passes OPENCODE_VERSION from a GitHub workflow', () => {
|
||||
const workflowsDir = join(REPO_ROOT, '.github', 'workflows')
|
||||
for (const entry of readdirSync(workflowsDir, { withFileTypes: true })) {
|
||||
|
||||
Reference in new issue
Block a user