motd-tool 1.0.2 → 1.0.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/Formula/motd-tool.rb +2 -2
- package/README.md +3 -0
- package/package.json +1 -1
- package/scripts/prepare-release.mjs +4 -1
package/Formula/motd-tool.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class MotdTool < Formula
|
|
2
2
|
desc "Tiny CLI that prints a random message of the day in your terminal"
|
|
3
3
|
homepage "https://github.com/AlucPro/motd-tool"
|
|
4
|
-
url "https://
|
|
5
|
-
sha256 "
|
|
4
|
+
url "https://github.com/AlucPro/motd-tool/releases/download/v1.0.3/motd-tool-1.0.3.tgz"
|
|
5
|
+
sha256 "021958739653b768eaf2784a4d82fbcbc97077775248ca0ad6c5ab220d80ade6"
|
|
6
6
|
license "MIT"
|
|
7
7
|
|
|
8
8
|
depends_on "node"
|
package/README.md
CHANGED
|
@@ -48,6 +48,8 @@ Install from Homebrew:
|
|
|
48
48
|
brew install AlucPro/tap/motd-tool
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
The Homebrew formula downloads the release tarball from GitHub Releases.
|
|
52
|
+
|
|
51
53
|
For local development, this repository uses `pnpm` and TypeScript:
|
|
52
54
|
|
|
53
55
|
```bash
|
|
@@ -165,6 +167,7 @@ When the tag lands on GitHub, the `Release` workflow will:
|
|
|
165
167
|
- build and test the project
|
|
166
168
|
- publish `motd-tool` to npm with `NPM_TOKEN`
|
|
167
169
|
- rebuild the Homebrew formula with the new npm tarball SHA
|
|
170
|
+
- point the Homebrew formula at the matching GitHub Release asset
|
|
168
171
|
- push `Formula/motd-tool.rb` to `AlucPro/homebrew-tap` with `HOMEBREW_TAP_TOKEN`
|
|
169
172
|
- create a GitHub Release with the packaged tarball
|
|
170
173
|
|
package/package.json
CHANGED
|
@@ -17,7 +17,10 @@ if (!fs.existsSync(tarballPath)) {
|
|
|
17
17
|
|
|
18
18
|
const sha256 = crypto.createHash("sha256").update(fs.readFileSync(tarballPath)).digest("hex");
|
|
19
19
|
const formula = fs.readFileSync(formulaPath, "utf8")
|
|
20
|
-
.replace(
|
|
20
|
+
.replace(
|
|
21
|
+
/https:\/\/github\.com\/AlucPro\/motd-tool\/releases\/download\/v\d+\.\d+\.\d+\/motd-tool-\d+\.\d+\.\d+\.tgz|https:\/\/registry\.npmjs\.org\/motd-tool\/-\/motd-tool-\d+\.\d+\.\d+\.tgz/,
|
|
22
|
+
`https://github.com/AlucPro/motd-tool/releases/download/v${version}/motd-tool-${version}.tgz`
|
|
23
|
+
)
|
|
21
24
|
.replace(/sha256 "[^"]+"/, `sha256 "${sha256}"`);
|
|
22
25
|
|
|
23
26
|
fs.writeFileSync(formulaPath, formula, "utf8");
|