git-stack-cli 2.2.4 → 2.2.6
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/js/index.js +1 -1
- package/package.json +1 -1
- package/scripts/core/spawn.ts +8 -2
- package/scripts/release-npm.ts +3 -1
package/dist/js/index.js
CHANGED
|
@@ -45646,7 +45646,7 @@ var yargs_default = Yargs;
|
|
|
45646
45646
|
|
|
45647
45647
|
// src/command.ts
|
|
45648
45648
|
async function command2() {
|
|
45649
|
-
return yargs_default(hideBin(process.argv)).usage("Usage: git stack [command] [options]").command("$0", "Sync commit ranges to Github", (yargs) => yargs.options(DefaultOptions)).command("fixup [commit]", "Amend staged changes to a specific commit in history", (yargs) => yargs.positional("commit", FixupOptions.commit)).command("log [args...]", "Print an abbreviated log with numbered commits, useful for git stack fixup", (yargs) => yargs.strict(false)).command("rebase", "Update local branch via rebase with latest changes from origin master branch", (yargs) => yargs).option("verbose", GlobalOptions.verbose).wrap(123).strict().version("2.2.
|
|
45649
|
+
return yargs_default(hideBin(process.argv)).usage("Usage: git stack [command] [options]").command("$0", "Sync commit ranges to Github", (yargs) => yargs.options(DefaultOptions)).command("fixup [commit]", "Amend staged changes to a specific commit in history", (yargs) => yargs.positional("commit", FixupOptions.commit)).command("log [args...]", "Print an abbreviated log with numbered commits, useful for git stack fixup", (yargs) => yargs.strict(false)).command("rebase", "Update local branch via rebase with latest changes from origin master branch", (yargs) => yargs).option("verbose", GlobalOptions.verbose).wrap(123).strict().version("2.2.6").showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`").help("help", "Show usage via `git stack help`").argv;
|
|
45650
45650
|
}
|
|
45651
45651
|
var GlobalOptions = {
|
|
45652
45652
|
verbose: {
|
package/package.json
CHANGED
package/scripts/core/spawn.ts
CHANGED
|
@@ -37,9 +37,15 @@ spawn.sync = async function spawnSync(unsafe_cmd: CommandLike) {
|
|
|
37
37
|
|
|
38
38
|
const stdout = String(proc.stdout).trim();
|
|
39
39
|
const stderr = String(proc.stderr).trim();
|
|
40
|
+
const exit_code = proc.exitCode;
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
console.debug(
|
|
42
|
+
const display_cmd_exit = `${cmd.str} (${exit_code})`;
|
|
43
|
+
console.debug("[end]", display_cmd_exit);
|
|
44
|
+
console.debug({ stdout, stderr, exit_code });
|
|
45
|
+
|
|
46
|
+
if (exit_code) {
|
|
47
|
+
throw new Error(`[failed] ${display_cmd_exit}`);
|
|
48
|
+
}
|
|
43
49
|
|
|
44
50
|
return { proc, stdout, stderr };
|
|
45
51
|
};
|
package/scripts/release-npm.ts
CHANGED
|
@@ -19,7 +19,9 @@ process.chdir(REPO_ROOT);
|
|
|
19
19
|
// require clean git status besides changes to package.json version
|
|
20
20
|
const git_status = await spawn.sync("git status --porcelain");
|
|
21
21
|
if (!/^M\s+package.json/.test(git_status.stdout)) {
|
|
22
|
-
console.error(
|
|
22
|
+
console.error(
|
|
23
|
+
"please commit local changes and only update package.json version before running release",
|
|
24
|
+
);
|
|
23
25
|
process.exit(4);
|
|
24
26
|
}
|
|
25
27
|
|