@docupace/pipeline 1.0.39-matttest.0 → 1.0.39-matttest.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.
- package/package.json +1 -1
- package/src/changeset/cli.js +1 -7
- package/src/changeset/validate.js +3 -1
- package/src/next/util.js +6 -0
package/package.json
CHANGED
package/src/changeset/cli.js
CHANGED
|
@@ -10,6 +10,7 @@ import z from 'zod';
|
|
|
10
10
|
import dotenv from 'dotenv';
|
|
11
11
|
import { makeJiraRequest, updateComponentVersion } from '../next/jira.js';
|
|
12
12
|
dotenv.config({ path: ['.env.pipeline.local', 'config/.env.pipeline.local'] });
|
|
13
|
+
import { setGitInfo } from '../next/util.js';
|
|
13
14
|
|
|
14
15
|
const program = new Command();
|
|
15
16
|
|
|
@@ -61,13 +62,6 @@ async function getMainPackage() {
|
|
|
61
62
|
throw new Error('Main package.json not found');
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
// Helper function to set Git info
|
|
65
|
-
async function setGitInfo() {
|
|
66
|
-
await $`git config --global user.email "gitops@docupace.com"`;
|
|
67
|
-
await $`git config --global user.name "Gitops"`;
|
|
68
|
-
await $`git remote set-url origin https://${process.env.THIS_REP_TOKEN}@bitbucket.org/${process.env.BITBUCKET_REPO_FULL_NAME}.git`;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
65
|
const changeSetPackage = `{
|
|
72
66
|
"name": "changeset-package",
|
|
73
67
|
"version": "1.0.0",
|
|
@@ -2,7 +2,7 @@ import fs from 'fs';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { $ } from 'zx';
|
|
4
4
|
|
|
5
|
-
import { getChangedPackages, isMonoRepo } from '../next/util.js';
|
|
5
|
+
import { getChangedPackages, isMonoRepo, setGitInfo } from '../next/util.js';
|
|
6
6
|
|
|
7
7
|
const CHANGESET_DIR = '.changeset';
|
|
8
8
|
|
|
@@ -31,7 +31,9 @@ export async function validateChangesets() {
|
|
|
31
31
|
await validateChangesetPath(path.resolve(process.cwd(), CHANGESET_DIR));
|
|
32
32
|
}*/
|
|
33
33
|
|
|
34
|
+
await setGitInfo();
|
|
34
35
|
const destBranch = process.env.BITBUCKET_PR_DESTINATION_BRANCH;
|
|
36
|
+
await $`git fetch origin ${destBranch}:${destBranch}`;
|
|
35
37
|
await $`changeset status --since=${destBranch}`;
|
|
36
38
|
}
|
|
37
39
|
|
package/src/next/util.js
CHANGED
|
@@ -50,3 +50,9 @@ export async function getChangedPackages(fromRef, toRef) {
|
|
|
50
50
|
return [];
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
export async function setGitInfo() {
|
|
55
|
+
await $`git config --global user.email "gitops@docupace.com"`;
|
|
56
|
+
await $`git config --global user.name "Gitops"`;
|
|
57
|
+
await $`git remote set-url origin https://${process.env.THIS_REP_TOKEN}@bitbucket.org/${process.env.BITBUCKET_REPO_FULL_NAME}.git`;
|
|
58
|
+
}
|