Skip to content

Commit 8245d49

Browse files
committed
chore: add install step in homebrew formula + minor ci tweaks
1 parent a8cc816 commit 8245d49

3 files changed

Lines changed: 30 additions & 14 deletions

File tree

.github/workflows/rust.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ permissions:
66
on:
77
push:
88
branches: [ "main", "development" ]
9+
paths:
10+
- 'crates/**/*'
911
pull_request:
1012
branches: [ "main", "development" ]
13+
paths:
14+
- 'crates/**/*'
1115

1216
env:
1317
CARGO_TERM_COLOR: always
@@ -17,10 +21,10 @@ jobs:
1721
runs-on: ubuntu-latest
1822
steps:
1923
- uses: actions/checkout@v4
20-
24+
2125
- name: Setup Rust
2226
uses: dtolnay/rust-toolchain@stable
23-
27+
2428
- name: Cache cargo registry
2529
uses: actions/cache@v4
2630
with:
@@ -30,26 +34,26 @@ jobs:
3034
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
3135
restore-keys: |
3236
${{ runner.os }}-cargo-
33-
37+
3438
# Removed target caching to ensure reproducible builds
3539
# Only cache registry/git (safe dependencies)
36-
40+
3741
- name: Build
3842
run: cargo build --verbose
39-
43+
4044
- name: Run tests
4145
run: cargo test --verbose
4246

4347
fmt:
4448
runs-on: ubuntu-latest
4549
steps:
4650
- uses: actions/checkout@v4
47-
51+
4852
- name: Setup Rust
4953
uses: dtolnay/rust-toolchain@stable
5054
with:
5155
components: rustfmt
52-
56+
5357
- name: Cache cargo registry
5458
uses: actions/cache@v4
5559
with:
@@ -59,20 +63,20 @@ jobs:
5963
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
6064
restore-keys: |
6165
${{ runner.os }}-cargo-
62-
66+
6367
- name: Check formatting
6468
run: cargo fmt -- --check
6569

6670
lint:
6771
runs-on: ubuntu-latest
6872
steps:
6973
- uses: actions/checkout@v4
70-
74+
7175
- name: Setup Rust
7276
uses: dtolnay/rust-toolchain@stable
7377
with:
7478
components: clippy
75-
79+
7680
- name: Cache cargo registry
7781
uses: actions/cache@v4
7882
with:
@@ -82,9 +86,9 @@ jobs:
8286
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
8387
restore-keys: |
8488
${{ runner.os }}-cargo-
85-
89+
8690
# Removed target caching to ensure reproducible builds
8791
# Clippy will compile from scratch each time
88-
92+
8993
- name: Clippy
9094
run: cargo clippy --all-targets --all-features -- -D warnings

pkg/homebrew/Formula/quickmark-cli.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ class QuickmarkCli < Formula
1414
end
1515
end
1616

17+
def install
18+
bin.install "qmark"
19+
end
20+
1721
test do
1822
# Create a test markdown file
1923
(testpath/"test.md").write("# Test\n\nThis is a test.")

pkg/homebrew/README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ qmark --config quickmark.toml *.md
3030
## Formula Details
3131

3232
- **Location**: `Formula/quickmark-cli.rb`
33-
- **Binary name**: `qmark`
33+
- **Binary name**: `qmark`
3434
- **Architecture support**: Intel and Apple Silicon Macs
3535
- **Installation method**: Pre-compiled binaries from GitHub releases
3636

@@ -43,6 +43,14 @@ When releasing a new version:
4343
3. Test the formula: `brew install --build-from-source ./Formula/quickmark-cli.rb`
4444
4. Commit and push the changes
4545

46+
### Testing changes locally
47+
48+
```bash
49+
brew tap-new local/quickmark-test
50+
cp pkg/homebrew/Formula/quickmark-cli.rb $(brew --repo local/quickmark-test)/Formula/
51+
brew install --build-from-source local/quickmark-test/quickmark-cli
52+
```
53+
4654
## Updating
4755

4856
```bash
@@ -55,4 +63,4 @@ brew upgrade quickmark-cli
5563
```bash
5664
brew uninstall quickmark-cli
5765
brew untap ekropotin/quickmark
58-
```
66+
```

0 commit comments

Comments
 (0)