@daiyam/artifact-vsx-ts 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Get version from command line argument (with 'v' prefix)
|
|
5
|
+
const version = process.argv[2];
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const changelog = fs.readFileSync(path.join(process.cwd(), 'CHANGELOG.md'), 'utf8');
|
|
9
|
+
|
|
10
|
+
// Regular expression to match a version section with the date
|
|
11
|
+
// Matches from "## v0.8.1 | 2025-04-23" until the next ## or end of file
|
|
12
|
+
const versionRegex = new RegExp(`## ${version} \\| \\d{4}-\\d{2}-\\d{2}[^#]*(?=## |$)`, 's');
|
|
13
|
+
|
|
14
|
+
const match = changelog.match(versionRegex);
|
|
15
|
+
|
|
16
|
+
if(match) {
|
|
17
|
+
// Remove the version header and trim whitespace
|
|
18
|
+
const notes = match[0].replace(/^## v\d+\.\d+\.\d+ \| \d{4}-\d{2}-\d{2}\n/, '').trim();
|
|
19
|
+
console.log(notes);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
console.error(`No changelog entry found for version ${version}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch(error) {
|
|
28
|
+
console.error('Error reading CHANGELOG.md:', error);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
@@ -22,8 +22,7 @@ jobs:
|
|
|
22
22
|
- name: Get Version
|
|
23
23
|
run: |
|
|
24
24
|
# Get the latest tag
|
|
25
|
-
git
|
|
26
|
-
LATEST_TAG=$(git describe --tags --abbrev=0)
|
|
25
|
+
LATEST_TAG=$(git tag --sort=-v:refname | head -n1)
|
|
27
26
|
if [ -z "$LATEST_TAG" ]; then
|
|
28
27
|
echo "No tags found in the repository"
|
|
29
28
|
exit 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daiyam/artifact-vsx-ts",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "The configuration to create Visual Studio extensions and publish them on Visual Studio Marketplace and Open VSX Registry.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Baptiste Augrain",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"project-template",
|
|
32
32
|
"scaffold"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "028048239296f4e5a9ab6a69fd644f14eb20d0bd"
|
|
35
35
|
}
|