mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-07 05:56:41 +02:00
refactor: setup tooling uses config-driven host detection
- host-config-export.ts: new CLI that exposes host configs to bash (list, get, detect, validate, symlinks commands) - bin/gstack-platform-detect: reads host configs instead of hardcoded binary/path mapping - scripts/skill-check.ts: iterates host configs for skill validation and freshness checks instead of separate Codex/Factory blocks - lib/worktree.ts: iterates host configs for directory copy instead of hardcoded .agents Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+7
-4
@@ -123,10 +123,13 @@ export class WorktreeManager {
|
||||
// Create detached worktree at current HEAD
|
||||
git(['worktree', 'add', '--detach', worktreePath, 'HEAD'], this.repoRoot);
|
||||
|
||||
// Copy gitignored build artifacts that tests need
|
||||
const agentsSrc = path.join(this.repoRoot, '.agents');
|
||||
if (fs.existsSync(agentsSrc)) {
|
||||
copyDirSync(agentsSrc, path.join(worktreePath, '.agents'));
|
||||
// Copy gitignored build artifacts that tests need (config-driven)
|
||||
const { getExternalHosts } = require('../hosts/index');
|
||||
for (const hostConfig of getExternalHosts()) {
|
||||
const hostSrc = path.join(this.repoRoot, hostConfig.hostSubdir);
|
||||
if (fs.existsSync(hostSrc)) {
|
||||
copyDirSync(hostSrc, path.join(worktreePath, hostConfig.hostSubdir));
|
||||
}
|
||||
}
|
||||
|
||||
const browseDist = path.join(this.repoRoot, 'browse', 'dist');
|
||||
|
||||
Reference in New Issue
Block a user