Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock the language version for the formula #58

Merged
merged 3 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ jobs:
fail-fast: false
matrix:
recipe:
- sass.rb
- [email protected]
- migrator.rb
- sass
- migrator

steps:
- uses: actions/checkout@v3
- run: brew update
- run: brew audit --strict --git --online --formula $GITHUB_WORKSPACE/Formula/${{ matrix.recipe }}
- run: brew install --formula $GITHUB_WORKSPACE/Formula/${{ matrix.recipe }}
- run: brew test $GITHUB_WORKSPACE/Formula/${{ matrix.recipe }}
- run: brew uninstall --formula $GITHUB_WORKSPACE/Formula/${{ matrix.recipe }}
- run: brew tap-new sass/sass
- run: brew --repository sass/sass
- run: |
path="$(brew --repository sass/sass)"
rm -rf "$path"
ln -s "$(pwd)" "$path"
# TODO: Add --online once https://github.com/Homebrew/brew/pull/16626 is fixed
- run: brew audit --strict --git sass/sass/${{ matrix.recipe }}
- run: brew install sass/sass/${{ matrix.recipe }}
- run: brew test sass/sass/${{ matrix.recipe }}
- run: brew uninstall sass/sass/${{ matrix.recipe }}
78 changes: 0 additions & 78 deletions Formula/[email protected]

This file was deleted.

9 changes: 9 additions & 0 deletions Formula/sass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@ class Sass < Formula
depends_on "buf" => :build
depends_on "dart-lang/dart/dart" => :build

resource "language" do
url "https://github.com/sass/sass.git",
revision: "c04dbf6c447caf9d62094597e68fe5bf5d0b4025"
end

def install
# Tell the pub server where these installations are coming from.
ENV["PUB_ENVIRONMENT"] = "homebrew:sass"

(buildpath/'build/language').install resource("language")

system _dart/"dart", "pub", "get"
ENV["UPDATE_SASS_PROTOCOL"] = "false"
system _dart/"dart", "run", "grinder", "protobuf"
ENV.delete "UPDATE_SASS_PROTOCOL"

# Build a native-code executable on 64-bit systems only. 32-bit Dart
# doesn't support this.
Expand Down
Loading