git-stack-cli 1.2.0 → 1.2.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.
@@ -34332,7 +34332,7 @@ async function command() {
34332
34332
  .wrap(140)
34333
34333
  // disallow unknown options
34334
34334
  .strict()
34335
- .version("1.2.0" )
34335
+ .version("1.2.1" )
34336
34336
  .showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`")
34337
34337
  .help("help", "Show usage via `git stack help`").argv);
34338
34338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-stack-cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "author": "magus",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@ if (!previous_version_match?.groups) {
43
43
  const previous_version = previous_version_match.groups.version;
44
44
  // convert `1.0.4` to `104`
45
45
  const not_dot_version = previous_version.replace(/\./g, "");
46
- const previous_class = `GitStackAt${not_dot_version}`;
46
+ const previous_class = `GitStackAT${not_dot_version}`;
47
47
  previous_formula = previous_formula.replace(
48
48
  "class GitStack",
49
49
  `class ${previous_class}`
@@ -70,6 +70,8 @@ const re_token = (name: string) => new RegExp(`{{ ${name} }}`, "g");
70
70
 
71
71
  process.chdir(HOMEBREW_DIR);
72
72
 
73
+ // homebrew tap formula (binaries)
74
+
73
75
  let tap = await file.read_text(
74
76
  path.join("templates", "git-stack.tap.rb.template")
75
77
  );
@@ -82,18 +84,25 @@ tap = tap.replace(re_token("linux_sha256"), linux_asset.sha256);
82
84
 
83
85
  await file.write_text(path.join("Formula", "git-stack.rb"), tap);
84
86
 
87
+ // homebrew/core formula (build from source)
88
+
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
+
85
95
  let core = await file.read_text(
86
96
  path.join("templates", "git-stack.core.rb.template")
87
97
  );
88
98
 
89
99
  core = core.replace(re_token("version"), version);
90
- core = core.replace(re_token("mac_bin"), macos_asset.filepath);
91
- core = core.replace(re_token("mac_sha256"), macos_asset.sha256);
92
- core = core.replace(re_token("linux_bin"), linux_asset.filepath);
93
- core = core.replace(re_token("linux_sha256"), linux_asset.sha256);
100
+ core = core.replace(re_token("tarball_sha256"), tarball_asset.sha256);
94
101
 
95
102
  await file.write_text(path.join("Formula", "git-stack.core.rb"), core);
96
103
 
104
+ await file.rm(tarball_asset.filepath);
105
+
97
106
  // finally upload the assets to the github release
98
107
  process.chdir(STANDALONE_DIR);
99
108
  await spawn.sync(`gh release upload ${version} ${linux_asset.filepath}`);
@@ -14,12 +14,11 @@ const package_json = await file.read_json(
14
14
 
15
15
  const version = package_json.version;
16
16
 
17
+ // generates local tarball e.g. git-stack-cli-1.2.0.tgz
17
18
  await spawn("npm pack");
18
19
 
19
20
  // prettier-ignore
20
- const tarball_asset = (
21
- await create_asset(`git-stack-cli-${version}.tgz`, { version })
22
- );
21
+ const tarball_asset = await create_asset(`git-stack-cli-${version}.tgz`, { version });
23
22
 
24
23
  await spawn.sync(`gh release create ${version} -t ${version} --generate-notes`);
25
24