@ucdjs/release-scripts 0.1.0-beta.38 → 0.1.0-beta.39
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/dist/index.mjs +5 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -474,14 +474,16 @@ async function createBranch(branch, base, workspaceRoot) {
|
|
|
474
474
|
async function checkoutBranch(branch, workspaceRoot) {
|
|
475
475
|
try {
|
|
476
476
|
logger.info(`Switching to branch: ${farver.green(branch)}`);
|
|
477
|
-
const
|
|
477
|
+
const output = (await run("git", ["checkout", branch], { nodeOptions: {
|
|
478
478
|
cwd: workspaceRoot,
|
|
479
479
|
stdio: "pipe"
|
|
480
|
-
} })).stderr.trim()
|
|
480
|
+
} })).stderr.trim();
|
|
481
|
+
const match = output.match(/Switched to branch '(.+)'/);
|
|
481
482
|
if (match && match[1] === branch) {
|
|
482
483
|
logger.info(`Successfully switched to branch: ${farver.green(branch)}`);
|
|
483
484
|
return ok(true);
|
|
484
485
|
}
|
|
486
|
+
console.warn(`Unexpected git checkout output: ${output}`);
|
|
485
487
|
return ok(false);
|
|
486
488
|
} catch (error) {
|
|
487
489
|
const gitError = toGitError("checkoutBranch", error);
|
|
@@ -2062,10 +2064,7 @@ async function verifyWorkflow(options) {
|
|
|
2062
2064
|
if (!originalBranch.ok) exitWithError(originalBranch.error.message);
|
|
2063
2065
|
if (originalBranch.value !== defaultBranch) {
|
|
2064
2066
|
const checkout = await checkoutBranch(defaultBranch, options.workspaceRoot);
|
|
2065
|
-
if (!checkout.ok || !checkout.value) {
|
|
2066
|
-
console.error(checkout.ok === false && checkout.error);
|
|
2067
|
-
exitWithError(`Failed to checkout branch: ${defaultBranch}`);
|
|
2068
|
-
}
|
|
2067
|
+
if (!checkout.ok || !checkout.value) exitWithError(`Failed to checkout branch: ${defaultBranch}`);
|
|
2069
2068
|
}
|
|
2070
2069
|
let existingOverrides = {};
|
|
2071
2070
|
try {
|