Skip to content

Commit

Permalink
Merge pull request #58 from sass/lock-language-version
Browse files Browse the repository at this point in the history
Lock the language version for the formula
  • Loading branch information
nex3 authored Feb 9, 2024
2 parents 4dcbe94 + 7c2ce4c commit f53c788
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 85 deletions.
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

0 comments on commit f53c788

Please sign in to comment.