diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..e502910 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/test-formula.yml b/.github/workflows/test-formula.yml index 3f8e99f..12469c6 100644 --- a/.github/workflows/test-formula.yml +++ b/.github/workflows/test-formula.yml @@ -1,12 +1,29 @@ name: Test Homebrew Formula -on: [push] +on: + pull_request: + branches: + - main + push: + branches: + - main jobs: - macos: - runs-on: macos-latest + test_formula: + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + + - name: Install Homebrew (Linux only) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y build-essential curl file git + sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" + echo /home/linuxbrew/.linuxbrew/bin >> $GITHUB_PATH - name: Install Dashlane CLI from rb file run: brew install --build-from-source Formula/dashlane-cli.rb diff --git a/Formula/dashlane-cli.rb b/Formula/dashlane-cli.rb index b74d474..9137684 100644 --- a/Formula/dashlane-cli.rb +++ b/Formula/dashlane-cli.rb @@ -12,12 +12,16 @@ class DashlaneCli < Formula strategy :github_latest end - option 'with-corepack', 'Use yarn from corepack instead of installing it' + option "with-corepack", "Use yarn from corepack instead of installing it" depends_on "node@18" => :build - - depends_on 'yarn' if !build.with?('corepack') - depends_on 'corepack' if build.with?('corepack') + + # Needed for node-gyp packages + depends_on "python" => :build + depends_on "python-setuptools" => :build + + depends_on "yarn" if !build.with?("corepack") + depends_on "corepack" if build.with?("corepack") on_macos do # macos 12+ only