@docupace/pipeline 1.0.0-alpha.17 → 1.0.0-alpha.18
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.
- package/package.json +1 -1
- package/src/changeset/cli.js +23 -16
package/package.json
CHANGED
package/src/changeset/cli.js
CHANGED
|
@@ -16,6 +16,25 @@ async function setGitInfo() {
|
|
|
16
16
|
await $`git remote set-url origin https://x-token-auth:${process.env.BITBUCKET_TOKEN}@bitbucket.org/dp-cloud/docupace-graphql-server.git`;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
async function versionCommand() {
|
|
20
|
+
console.log('📦 Running Changeset versioning...');
|
|
21
|
+
await setGitInfo();
|
|
22
|
+
await $`pnpm changeset version`;
|
|
23
|
+
console.log('✅ Changeset versioning complete.');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function commitTagCommand() {
|
|
27
|
+
console.log('📌 Committing and tagging the new version...');
|
|
28
|
+
await setGitInfo();
|
|
29
|
+
await $`git add .`;
|
|
30
|
+
await $`git commit -m "chore: version bump and changelog"`;
|
|
31
|
+
await $`git push origin`;
|
|
32
|
+
const newVersion = (await $`node -p "require('./package.json').version"`).stdout.trim();
|
|
33
|
+
await $`git tag v${newVersion}`;
|
|
34
|
+
await $`git push origin --tags`;
|
|
35
|
+
console.log(`✅ Version ${newVersion} tagged and pushed.`);
|
|
36
|
+
}
|
|
37
|
+
|
|
19
38
|
// Command: validate
|
|
20
39
|
program
|
|
21
40
|
.command('validate <path>')
|
|
@@ -32,16 +51,12 @@ program
|
|
|
32
51
|
process.exit(1);
|
|
33
52
|
}
|
|
34
53
|
});
|
|
35
|
-
|
|
36
54
|
// Command: version
|
|
37
55
|
program
|
|
38
56
|
.command('version')
|
|
39
57
|
.description('Run Changeset versioning')
|
|
40
58
|
.action(async () => {
|
|
41
|
-
|
|
42
|
-
await setGitInfo();
|
|
43
|
-
await $`pnpm changeset version`;
|
|
44
|
-
console.log('✅ Changeset versioning complete.');
|
|
59
|
+
await versionCommand();
|
|
45
60
|
});
|
|
46
61
|
|
|
47
62
|
// Command: commit-and-tag
|
|
@@ -49,15 +64,7 @@ program
|
|
|
49
64
|
.command('commit-tag')
|
|
50
65
|
.description('Commit and tag the new version')
|
|
51
66
|
.action(async () => {
|
|
52
|
-
|
|
53
|
-
await setGitInfo();
|
|
54
|
-
await $`git add .`;
|
|
55
|
-
await $`git commit -m "chore: version bump and changelog"`;
|
|
56
|
-
await $`git push origin`;
|
|
57
|
-
const newVersion = (await $`node -p "require('./package.json').version"`).stdout.trim();
|
|
58
|
-
await $`git tag v${newVersion}`;
|
|
59
|
-
await $`git push origin --tags`;
|
|
60
|
-
console.log(`✅ Version ${newVersion} tagged and pushed.`);
|
|
67
|
+
await commitTagCommand();
|
|
61
68
|
});
|
|
62
69
|
|
|
63
70
|
// Command: all
|
|
@@ -66,8 +73,8 @@ program
|
|
|
66
73
|
.description('Run versioning and commit-and-tag in sequence')
|
|
67
74
|
.action(async () => {
|
|
68
75
|
console.log('📦 Running all steps...');
|
|
69
|
-
await
|
|
70
|
-
await
|
|
76
|
+
await versionCommand();
|
|
77
|
+
await commitTagCommand();
|
|
71
78
|
});
|
|
72
79
|
|
|
73
80
|
// Parse arguments
|