@oneblink/release-cli 3.3.0 → 3.3.1-beta.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.
|
@@ -20,14 +20,14 @@ export default async function startUpdateDependents({ cwd }) {
|
|
|
20
20
|
}
|
|
21
21
|
const dependency = dependencyResult.packageJson.name;
|
|
22
22
|
console.log('Beginning to update the dependents of:', dependency);
|
|
23
|
-
const {
|
|
23
|
+
const { ticket } = await enquirer.prompt({
|
|
24
24
|
type: 'input',
|
|
25
|
-
name: '
|
|
26
|
-
message: `
|
|
25
|
+
name: 'ticket',
|
|
26
|
+
message: `Ticket to associate with pull requests? (e.g. ON-4323, OB-4323)`,
|
|
27
27
|
required: true,
|
|
28
28
|
validate: (input) => {
|
|
29
|
-
if (!/^ON
|
|
30
|
-
return '
|
|
29
|
+
if (!/^(ON-|OB-)\d+$/.test(input)) {
|
|
30
|
+
return 'Ticket must be "ON-" or "OB-" followed by a number';
|
|
31
31
|
}
|
|
32
32
|
return true;
|
|
33
33
|
},
|
|
@@ -87,7 +87,7 @@ export default async function startUpdateDependents({ cwd }) {
|
|
|
87
87
|
if (isUpdating === 'no') {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
await executeCommand('git', ['checkout', '-b',
|
|
90
|
+
await executeCommand('git', ['checkout', '-b', ticket], repositoryWorkingDirectory);
|
|
91
91
|
if (isUpdatingTypes === 'yes') {
|
|
92
92
|
await executeCommand('npm', ['install', '--package-lock-only', '-D', '@oneblink/types'], repositoryWorkingDirectory);
|
|
93
93
|
}
|
|
@@ -98,9 +98,9 @@ export default async function startUpdateDependents({ cwd }) {
|
|
|
98
98
|
`${dependency}@${dependencyResult.packageJson.version}`,
|
|
99
99
|
], repositoryWorkingDirectory);
|
|
100
100
|
await executeCommand('git', ['add', '-A'], repositoryWorkingDirectory);
|
|
101
|
-
await executeCommand('git', ['commit', '--message', `${
|
|
102
|
-
await executeCommand('git', ['push', '-u', 'origin',
|
|
103
|
-
createPullRequestUrls.push(`https://github.com/oneblink/${productRepository.repositoryName}/pull/new/${
|
|
101
|
+
await executeCommand('git', ['commit', '--message', `${ticket} # Bumped ${dependency}`], repositoryWorkingDirectory);
|
|
102
|
+
await executeCommand('git', ['push', '-u', 'origin', ticket], repositoryWorkingDirectory);
|
|
103
|
+
createPullRequestUrls.push(`https://github.com/oneblink/${productRepository.repositoryName}/pull/new/${ticket}`);
|
|
104
104
|
});
|
|
105
105
|
if (createPullRequestUrls.length) {
|
|
106
106
|
console.log(boxen(`The following Pull Requests can be created:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneblink/release-cli",
|
|
3
3
|
"description": "Used internally by OneBlink to release repositories quickly and consistently",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.1-beta.1",
|
|
5
5
|
"author": "OneBlink <developers@oneblink> (https://github.com/oneblink)",
|
|
6
6
|
"bin": {
|
|
7
7
|
"oneblink-release": "dist/bin.js"
|