git-stack-cli 1.2.1 → 1.2.3
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/cjs/index.cjs +10 -6
- package/package.json +1 -1
- package/scripts/release-brew.ts +9 -15
- package/src/command.ts +10 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -34295,7 +34295,11 @@ async function command() {
|
|
|
34295
34295
|
type: "string",
|
|
34296
34296
|
choices: [Rebase["git-revise"], Rebase["cherry-pick"]],
|
|
34297
34297
|
default: Rebase["git-revise"],
|
|
34298
|
-
description:
|
|
34298
|
+
description: [
|
|
34299
|
+
"Strategy used for syncing branches",
|
|
34300
|
+
`${Rebase["git-revise"]}: perform faster in-memory rebase`,
|
|
34301
|
+
`${Rebase["cherry-pick"]}: use disk and incrementally rebase each commit`,
|
|
34302
|
+
].join(" | "),
|
|
34299
34303
|
})
|
|
34300
34304
|
.option("verbose", {
|
|
34301
34305
|
type: "boolean",
|
|
@@ -34312,7 +34316,7 @@ async function command() {
|
|
|
34312
34316
|
.option("branch", {
|
|
34313
34317
|
type: "string",
|
|
34314
34318
|
alias: ["b"],
|
|
34315
|
-
description:
|
|
34319
|
+
description: 'Set the master branch name, defaults to "master" (or "main" if "master" is not found)',
|
|
34316
34320
|
})
|
|
34317
34321
|
.option("write-state-json", {
|
|
34318
34322
|
hidden: true,
|
|
@@ -34326,13 +34330,13 @@ async function command() {
|
|
|
34326
34330
|
default: false,
|
|
34327
34331
|
description: "Mock local store metadata for testing",
|
|
34328
34332
|
})
|
|
34329
|
-
//
|
|
34330
|
-
// 140 seems to look decent so lets do that instead
|
|
34333
|
+
// yargs default wraps to 80 columns
|
|
34331
34334
|
// passing null will wrap to terminal width
|
|
34332
|
-
|
|
34335
|
+
// value below if what seems to look decent
|
|
34336
|
+
.wrap(123)
|
|
34333
34337
|
// disallow unknown options
|
|
34334
34338
|
.strict()
|
|
34335
|
-
.version("1.2.
|
|
34339
|
+
.version("1.2.3" )
|
|
34336
34340
|
.showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
|
|
34337
34341
|
.help("help", "Show usage via `git stack help`").argv);
|
|
34338
34342
|
}
|
package/package.json
CHANGED
package/scripts/release-brew.ts
CHANGED
|
@@ -56,6 +56,13 @@ await file.write_text(
|
|
|
56
56
|
|
|
57
57
|
process.chdir(PROJECT_DIR);
|
|
58
58
|
|
|
59
|
+
// download github asset and calculate sha256
|
|
60
|
+
// prettier-ignore
|
|
61
|
+
await spawn.sync(["gh", "release", "download", version, "-p", `git-stack-cli-${version}.tgz`]);
|
|
62
|
+
// prettier-ignore
|
|
63
|
+
const tarball_asset = await create_asset(`git-stack-cli-${version}.tgz`, { version });
|
|
64
|
+
await file.rm(tarball_asset.filepath);
|
|
65
|
+
|
|
59
66
|
await spawn(`npm run build:standalone`);
|
|
60
67
|
|
|
61
68
|
process.chdir(STANDALONE_DIR);
|
|
@@ -86,12 +93,6 @@ await file.write_text(path.join("Formula", "git-stack.rb"), tap);
|
|
|
86
93
|
|
|
87
94
|
// homebrew/core formula (build from source)
|
|
88
95
|
|
|
89
|
-
// download github asset and calculate sha256
|
|
90
|
-
// prettier-ignore
|
|
91
|
-
await spawn.sync(`gh release download ${version} -p "git-stack-cli-${version}.tgz"`);
|
|
92
|
-
// prettier-ignore
|
|
93
|
-
const tarball_asset = await create_asset(`git-stack-cli-${version}.tgz`, { version });
|
|
94
|
-
|
|
95
96
|
let core = await file.read_text(
|
|
96
97
|
path.join("templates", "git-stack.core.rb.template")
|
|
97
98
|
);
|
|
@@ -101,8 +102,6 @@ core = core.replace(re_token("tarball_sha256"), tarball_asset.sha256);
|
|
|
101
102
|
|
|
102
103
|
await file.write_text(path.join("Formula", "git-stack.core.rb"), core);
|
|
103
104
|
|
|
104
|
-
await file.rm(tarball_asset.filepath);
|
|
105
|
-
|
|
106
105
|
// finally upload the assets to the github release
|
|
107
106
|
process.chdir(STANDALONE_DIR);
|
|
108
107
|
await spawn.sync(`gh release upload ${version} ${linux_asset.filepath}`);
|
|
@@ -117,13 +116,8 @@ await spawn.sync(`git push`);
|
|
|
117
116
|
|
|
118
117
|
// commmit changes to main repo
|
|
119
118
|
process.chdir(PROJECT_DIR);
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"commit",
|
|
123
|
-
"-a",
|
|
124
|
-
"-m",
|
|
125
|
-
`homebrew-git-stack ${version}`,
|
|
126
|
-
]);
|
|
119
|
+
// prettier-ignore
|
|
120
|
+
await spawn.sync(["git", "commit", "-a", "-m", `homebrew-git-stack ${version}`]);
|
|
127
121
|
await spawn.sync(`git push`);
|
|
128
122
|
|
|
129
123
|
console.debug();
|
package/src/command.ts
CHANGED
|
@@ -35,7 +35,11 @@ export async function command() {
|
|
|
35
35
|
type: "string",
|
|
36
36
|
choices: [Rebase["git-revise"], Rebase["cherry-pick"]],
|
|
37
37
|
default: Rebase["git-revise"],
|
|
38
|
-
description:
|
|
38
|
+
description: [
|
|
39
|
+
"Strategy used for syncing branches",
|
|
40
|
+
`${Rebase["git-revise"]}: perform faster in-memory rebase`,
|
|
41
|
+
`${Rebase["cherry-pick"]}: use disk and incrementally rebase each commit`,
|
|
42
|
+
].join(" | "),
|
|
39
43
|
})
|
|
40
44
|
|
|
41
45
|
.option("verbose", {
|
|
@@ -55,7 +59,8 @@ export async function command() {
|
|
|
55
59
|
.option("branch", {
|
|
56
60
|
type: "string",
|
|
57
61
|
alias: ["b"],
|
|
58
|
-
description:
|
|
62
|
+
description:
|
|
63
|
+
'Set the master branch name, defaults to "master" (or "main" if "master" is not found)',
|
|
59
64
|
})
|
|
60
65
|
|
|
61
66
|
.option("write-state-json", {
|
|
@@ -72,10 +77,10 @@ export async function command() {
|
|
|
72
77
|
description: "Mock local store metadata for testing",
|
|
73
78
|
})
|
|
74
79
|
|
|
75
|
-
//
|
|
76
|
-
// 140 seems to look decent so lets do that instead
|
|
80
|
+
// yargs default wraps to 80 columns
|
|
77
81
|
// passing null will wrap to terminal width
|
|
78
|
-
|
|
82
|
+
// value below if what seems to look decent
|
|
83
|
+
.wrap(123)
|
|
79
84
|
|
|
80
85
|
// disallow unknown options
|
|
81
86
|
.strict()
|