From 311eb9516cefa3dacbeea36d38f994435e4097ba Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 10:24:58 +0000 Subject: build(plugin): version the VSIX by the last plugin commit Co-Authored-By: Claude Opus 5.5 --- plugin/scripts/package.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin/scripts/package.js') diff --git a/plugin/scripts/package.js b/plugin/scripts/package.js index 67ff99f..7ef8f17 100644 --- a/plugin/scripts/package.js +++ b/plugin/scripts/package.js @@ -5,13 +5,13 @@ const path = require('node:path'); const pluginDir = path.resolve(__dirname, '..'); try { - const revision = execFileSync('git', ['log', '-1', '--format=%ct:%h'], { + const revision = execFileSync('git', ['log', '-1', '--format=%ct:%h', '--', '.'], { cwd: pluginDir, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }).trim(); const match = /^(\d+):([0-9a-f]+)$/.exec(revision); - if (!match) throw new Error('Cannot read the HEAD commit for the package version.'); + if (!match) throw new Error('Cannot read the last plugin commit for the package version.'); const timestamp = new Date(Number(match[1]) * 1000).toISOString(); const date = timestamp.slice(0, 10).replace(/-/g, ''); const time = timestamp.slice(11, 19).replace(/:/g, ''); -- cgit v1.3.1-4-g156e