File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,16 +19,21 @@ jobs:
1919
2020 - name : Build and Install via Formula
2121 run : |
22- # Adjust formula URL to point to current directory for local testing
23- sed -i '' "s|url .*|url \"file://$(pwd)\"|" gplaces.rb
24- sed -i '' "s|sha256 .*|sha256 \"$(git archive --format=tar.gz HEAD | shasum -a 256 | cut -d ' ' -f 1)\"|" gplaces.rb
25-
22+ # Create a tarball of the current repository state
23+ git archive --format=tar.gz --output=gplaces.tar.gz HEAD
24+ SHA=$(shasum -a 256 gplaces.tar.gz | cut -d ' ' -f 1)
25+
26+ # Adjust formula URL and SHA to point to the local tarball
27+ sed -i '' "s|url .*|url \"file://$(pwd)/gplaces.tar.gz\"|" gplaces.rb
28+ sed -i '' "s|sha256 .*|sha256 \"$SHA\"|" gplaces.rb
29+
2630 # Create a local tap to satisfy Homebrew's requirement
2731 brew tap-new local/gplaces
2832 mkdir -p $(brew --repository local/gplaces)/Formula
2933 cp -f gplaces.rb $(brew --repository local/gplaces)/Formula/
3034 brew install --build-from-source local/gplaces/gplaces
3135
36+
3237 - name : Verify Version
3338 run : |
3439 gplaces --version
You can’t perform that action at this time.
0 commit comments