Skip to content

Commit e7f6017

Browse files
committed
update node; calculate sha
1 parent 7800b2c commit e7f6017

3 files changed

Lines changed: 30 additions & 10 deletions

File tree

Formula/dev-tools.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,13 @@ class DevTools < Formula
1414
regex(/"version":"(\d+\.\d+\.\d+)"/)
1515
end
1616

17-
depends_on "node@18"
17+
depends_on "node@24"
1818

1919
def install
2020
# Install the npm package with all dependencies
2121
system "npm", "install", *Language::Node.std_npm_install_args(libexec), "@builder.io/dev-tools@#{version}"
2222

2323
# Create wrapper scripts for the different command names
24-
(bin/"builder-dev-tools").write <<~EOS
25-
#!/bin/bash
26-
exec "#{libexec}/lib/node_modules/@builder.io/dev-tools/cli/main.cjs" "$@"
27-
EOS
28-
2924
(bin/"builder.io").write <<~EOS
3025
#!/bin/bash
3126
exec "#{libexec}/lib/node_modules/@builder.io/dev-tools/cli/main.cjs" "$@"
@@ -36,7 +31,6 @@ def install
3631
exec "#{libexec}/lib/node_modules/@builder.io/dev-tools/cli/main.cjs" "$@"
3732
EOS
3833

39-
chmod 0755, bin/"builder-dev-tools"
4034
chmod 0755, bin/"builder.io"
4135
chmod 0755, bin/"builderio"
4236
end

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## How do I install these formulae?
44

5-
`brew install builder.io/dev-tools/<formula>`
5+
`brew install builderio/dev-tools/<formula>`
66

7-
Or `brew tap builder.io/dev-tools` and then `brew install <formula>`.
7+
Or `brew tap builderio/builderio` and then `brew install dev-tools`.
88

99
Or, in a `brew bundle` `Brewfile`:
1010

1111
```ruby
12-
tap "builder.io/dev-tools"
12+
tap "builderio/dev-tools"
1313
brew "<formula>"
1414
```
1515

calculate-sha256.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Script to calculate SHA256 hash for the Builder Dev Tools npm package
4+
# This is needed for the Homebrew formula
5+
6+
VERSION="1.11.43"
7+
PACKAGE_URL="https://registry.npmjs.org/@builder.io/dev-tools/-/dev-tools-${VERSION}.tgz"
8+
9+
echo "Downloading @builder.io/dev-tools version ${VERSION}..."
10+
curl -L -o "builder-dev-tools-${VERSION}.tgz" "${PACKAGE_URL}"
11+
12+
if [ $? -eq 0 ]; then
13+
echo "Download successful!"
14+
echo "Calculating SHA256 hash..."
15+
SHA256_HASH=$(shasum -a 256 "builder-dev-tools-${VERSION}.tgz" | cut -d' ' -f1)
16+
echo "SHA256 hash: ${SHA256_HASH}"
17+
echo ""
18+
echo "Update the formula with this hash:"
19+
echo "sha256 \"${SHA256_HASH}\""
20+
echo ""
21+
echo "Cleaning up downloaded file..."
22+
rm "builder-dev-tools-${VERSION}.tgz"
23+
else
24+
echo "Download failed!"
25+
exit 1
26+
fi

0 commit comments

Comments
 (0)