Skip to content

Commit

Permalink
Test brew package on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Mors committed May 21, 2024
1 parent eaaac69 commit 5893e60
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
Binary file added .DS_Store
Binary file not shown.
25 changes: 21 additions & 4 deletions .github/workflows/test-formula.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 8 additions & 4 deletions Formula/dashlane-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5893e60

Please sign in to comment.