| 101 | return await readText(join(repoRoot, path)); |
| 102 | }, |
| 103 | async getVersionString(_ref) { |
| 104 | // Try to mimic Python version: <latest tag> (<short sha>) |
| 105 | // For simplicity here, return just the short HEAD sha via git, falling back to 'unknown' |
| 106 | try { |
| 107 | const { execSync } = require('node:child_process'); |
| 108 | const tag = execSync('git describe --tags --abbrev=0', { cwd: repoRoot, stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim(); |
| 109 | const sha = execSync('git rev-parse --short HEAD', { cwd: repoRoot, stdio: ['ignore', 'pipe', 'ignore'] }).toString().trim(); |
| 110 | return `${tag} (${sha})`; |
| 111 | } catch { return 'unknown'; } |
| 112 | }, |
| 113 | }; |
| 114 | |
| 115 | const libraries = args.all ? Object.keys(dependencies) : [args.library]; |