doc-detective 3.4.0-dev.9 → 3.4.1-dev.1
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.
|
@@ -105,7 +105,7 @@ jobs:
|
|
|
105
105
|
# Remove ^ or ~ if present
|
|
106
106
|
CORE_VERSION_CLEAN=$(echo "$CORE_VERSION" | sed 's/^[^0-9]*//')
|
|
107
107
|
# Query GitHub API for release notes
|
|
108
|
-
RELEASE_INFO=$(gh release view "v$CORE_VERSION_CLEAN" --repo doc-detective/
|
|
108
|
+
RELEASE_INFO=$(gh release view "v$CORE_VERSION_CLEAN" --repo doc-detective/core --json body --jq .body || echo "No release notes found.")
|
|
109
109
|
echo "release_notes<<EOF" >> $GITHUB_OUTPUT
|
|
110
110
|
echo "$RELEASE_INFO" >> $GITHUB_OUTPUT
|
|
111
111
|
echo "EOF" >> $GITHUB_OUTPUT
|
package/dev/dev.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doc-detective",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1-dev.1",
|
|
4
4
|
"description": "Treat doc content as testable assertions to validate doc accuracy and product UX.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"doc-detective": "src/index.js"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
36
36
|
"axios": "^1.12.2",
|
|
37
|
-
"doc-detective-common": "3.4.
|
|
38
|
-
"doc-detective-core": "3.4.
|
|
37
|
+
"doc-detective-common": "^3.4.1",
|
|
38
|
+
"doc-detective-core": "^3.4.1",
|
|
39
39
|
"yargs": "^17.7.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
@@ -20,8 +20,8 @@ function execCommand(command, options = {}) {
|
|
|
20
20
|
|
|
21
21
|
function main() {
|
|
22
22
|
// Clean git state
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
execCommand("git checkout -- .");
|
|
24
|
+
execCommand("git clean -fd");
|
|
25
25
|
|
|
26
26
|
// Get current project version
|
|
27
27
|
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
@@ -54,42 +54,40 @@ function main() {
|
|
|
54
54
|
// Extract major and minor versions using semver
|
|
55
55
|
const projMajor = semver.major(projVersion);
|
|
56
56
|
const projMinor = semver.minor(projVersion);
|
|
57
|
+
const projPatch = semver.patch(projVersion);
|
|
57
58
|
const coreMajor = semver.major(coreVersion);
|
|
58
59
|
const coreMinor = semver.minor(coreVersion);
|
|
60
|
+
const corePatch = semver.patch(coreVersion);
|
|
59
61
|
|
|
60
|
-
console.log(`Project version: ${projMajor}.${projMinor}
|
|
61
|
-
console.log(`core version: ${coreMajor}.${coreMinor}
|
|
62
|
+
console.log(`Project version: ${projMajor}.${projMinor}.${projPatch}`);
|
|
63
|
+
console.log(`core version: ${coreMajor}.${coreMinor}.${corePatch}`);
|
|
62
64
|
|
|
63
65
|
let newVersion;
|
|
64
66
|
|
|
65
67
|
if (projMajor !== coreMajor || projMinor !== coreMinor) {
|
|
66
68
|
// Major or minor mismatch: set version to match doc-detective-core major.minor.0
|
|
67
69
|
newVersion = `${coreMajor}.${coreMinor}.0`;
|
|
68
|
-
|
|
69
|
-
// Validate the new version before setting it
|
|
70
|
-
if (!semver.valid(newVersion)) {
|
|
71
|
-
console.error(`Error: Generated invalid version: ${newVersion}`);
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
70
|
console.log(`Version mismatch detected. Setting version to: ${newVersion}`);
|
|
76
|
-
execCommand(`npm version --no-git-tag-version ${newVersion}`);
|
|
77
71
|
} else {
|
|
78
72
|
// Project version is already equal or greater than core version, just bump patch
|
|
79
|
-
console.log(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const updatedPackageJson = JSON.parse(
|
|
83
|
-
fs.readFileSync(packageJsonPath, "utf8")
|
|
73
|
+
console.log(
|
|
74
|
+
"Project version is current or ahead. Bumping patch version to:",
|
|
75
|
+
newVersion
|
|
84
76
|
);
|
|
85
|
-
newVersion =
|
|
77
|
+
newVersion = `${projMajor}.${projMinor}.${projPatch + 1}`;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Validate the new version before setting it
|
|
81
|
+
if (!semver.valid(newVersion)) {
|
|
82
|
+
console.error(`Error: Generated invalid version: ${newVersion}`);
|
|
83
|
+
process.exit(1);
|
|
86
84
|
}
|
|
87
85
|
|
|
86
|
+
execCommand(`npm version --no-git-tag-version ${newVersion}`);
|
|
87
|
+
|
|
88
88
|
// Commit changes
|
|
89
89
|
execCommand("git add package.json package-lock.json");
|
|
90
|
-
execCommand(
|
|
91
|
-
'git commit -m "update doc-detective-core [skip ci]"'
|
|
92
|
-
);
|
|
90
|
+
execCommand('git commit -m "update doc-detective-core [skip ci]"');
|
|
93
91
|
|
|
94
92
|
// Create tag
|
|
95
93
|
execCommand(`git tag "v${newVersion}"`);
|