Skip to content

Commit

Permalink
Merge pull request #1 from Dashlane/feature/test-homebrew-formula
Browse files Browse the repository at this point in the history
Feature/Test homebrew formula
  • Loading branch information
Corentin Mors authored Sep 4, 2023
2 parents 39140d6 + 2230a7a commit daa640e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/test-formula.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test Homebrew Formula

on: [push]

jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Install Dashlane CLI from rb file
run: brew install --build-from-source Formula/dashlane-cli.rb

- name: Run brew tests
run: brew test Formula/dashlane-cli.rb
10 changes: 4 additions & 6 deletions Formula/dashlane-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
class DashlaneCli < Formula
desc "Command-line interface for Dashlane"
homepage "https://dashlane.com"
url "https://github.com/Dashlane/dashlane-cli/archive/refs/tags/v1.14.0.tar.gz"
sha256 "9aef5c7c92eb8b18314d67aa36768340f502b77456e3e06fb2e19d7d912cce3b"
url "https://github.com/Dashlane/dashlane-cli/archive/refs/tags/v1.14.2.tar.gz"
sha256 "db3ce40b8edd52ad2a9efaf71e521b25a0510d1ebda93405c5c7bae8c5bca94c"
license "Apache-2.0"

livecheck do
Expand All @@ -16,17 +16,15 @@ class DashlaneCli < Formula
depends_on "yarn" => :build

on_macos do
# macos requires binaries to do codesign
depends_on xcode: :build
# macos 12+ only
depends_on macos: :monterey
end

def install
Language::Node.setup_npm_environment
platform = OS.linux? ? "linux" : "macos"
system "yarn", "set", "version", "berry"
system "yarn"
system "yarn", "set", "version", "3.4.1"
system "yarn", "install", "--frozen-lockfile"
system "yarn", "run", "build"
system "yarn", "workspaces", "focus", "--production"
system "yarn", "dlx", "pkg", ".",
Expand Down

0 comments on commit daa640e

Please sign in to comment.