git-stack-cli 1.2.0 → 1.2.2

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.2" )
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.2",
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}`
@@ -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);
@@ -70,6 +77,8 @@ const re_token = (name: string) => new RegExp(`{{ ${name} }}`, "g");
70
77
 
71
78
  process.chdir(HOMEBREW_DIR);
72
79
 
80
+ // homebrew tap formula (binaries)
81
+
73
82
  let tap = await file.read_text(
74
83
  path.join("templates", "git-stack.tap.rb.template")
75
84
  );
@@ -82,15 +91,14 @@ tap = tap.replace(re_token("linux_sha256"), linux_asset.sha256);
82
91
 
83
92
  await file.write_text(path.join("Formula", "git-stack.rb"), tap);
84
93
 
94
+ // homebrew/core formula (build from source)
95
+
85
96
  let core = await file.read_text(
86
97
  path.join("templates", "git-stack.core.rb.template")
87
98
  );
88
99
 
89
100
  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);
101
+ core = core.replace(re_token("tarball_sha256"), tarball_asset.sha256);
94
102
 
95
103
  await file.write_text(path.join("Formula", "git-stack.core.rb"), core);
96
104
 
@@ -108,13 +116,8 @@ await spawn.sync(`git push`);
108
116
 
109
117
  // commmit changes to main repo
110
118
  process.chdir(PROJECT_DIR);
111
- await spawn.sync([
112
- "git",
113
- "commit",
114
- "-a",
115
- "-m",
116
- `homebrew-git-stack ${version}`,
117
- ]);
119
+ // prettier-ignore
120
+ await spawn.sync(["git", "commit", "-a", "-m", `homebrew-git-stack ${version}`]);
118
121
  await spawn.sync(`git push`);
119
122
 
120
123
  console.debug();
@@ -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