Skip to content

Commit 334f36b

Browse files
Use git tag name for release package version
Previously tagged builds used the base version from manifest.json (e.g., "1.0.0") instead of the tag name (e.g., "1.0.0-rc3"). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7f9129f commit 334f36b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/copy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ function getVersionName(baseVersion) {
2222
// Get short commit hash
2323
const commitHash = execSync('git rev-parse --short HEAD', { cwd: ROOT, encoding: 'utf8' }).trim();
2424

25-
// Check if HEAD is tagged (production release)
25+
// Check if HEAD is tagged (release build)
2626
try {
27-
execSync('git describe --exact-match HEAD', { cwd: ROOT, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] });
28-
// HEAD is tagged - production build, use base version
29-
return baseVersion;
27+
const tag = execSync('git describe --exact-match HEAD', { cwd: ROOT, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
28+
// HEAD is tagged - use tag name as version (strip 'v' prefix if present)
29+
return tag.startsWith('v') ? tag.slice(1) : tag;
3030
} catch {
3131
// Not tagged - development build
3232
}

0 commit comments

Comments
 (0)