05e809a
commit 05e809a
4 files changed
+32 -3
Showing 4 changed files+32-3
▼.github/workflows/release.yml
+16-0
| @@ -69,3 +69,19 @@ jobs: | ||
69 | 69 | with: |
70 | 70 | files: ${{ matrix.archive }} |
71 | 71 | generate_release_notes: true |
72 | + | |
73 | + # ── Publish to crates.io ─────────────────────────────────────────────────── | |
74 | + publish: | |
75 | + name: Publish to crates.io | |
76 | + runs-on: ubuntu-latest | |
77 | + needs: release | |
78 | + steps: | |
79 | + - uses: actions/checkout@v4 | |
80 | + | |
81 | + - name: Install Rust toolchain | |
82 | + uses: dtolnay/rust-toolchain@stable | |
83 | + | |
84 | + - name: Publish to crates.io | |
85 | + run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
86 | + env: | |
87 | + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
72 | 88 | |
▼Cargo.toml
+9-1
| @@ -2,13 +2,21 @@ | ||
2 | 2 | name = "fetchx" |
3 | 3 | version = "0.2.0" |
4 | 4 | edition = "2021" |
5 | -authors = ["FetchX Contributors"] | |
5 | +authors = ["Swadhin Biswas <[email protected]>"] | |
6 | 6 | description = "A blazing-fast neofetch alternative — system information tool with image support, smart caching, 60+ distro logos, and Nerd Font icons" |
7 | 7 | license = "MIT" |
8 | 8 | repository = "https://github.com/swadhinbiswas/fetchx" |
9 | +homepage = "https://github.com/swadhinbiswas/fetchx" | |
10 | +documentation = "https://github.com/swadhinbiswas/fetchx#readme" | |
9 | 11 | keywords = ["neofetch", "system-info", "terminal", "fetch", "ascii-art"] |
10 | 12 | categories = ["command-line-utilities"] |
11 | 13 | readme = "README.md" |
14 | +rust-version = "1.70" | |
15 | +exclude = [ | |
16 | + "assets/*.png", | |
17 | + ".github/", | |
18 | + "target/", | |
19 | +] | |
12 | 20 | |
13 | 21 | [dependencies] |
14 | 22 | # CLI argument parsing |
15 | 23 | |
▼src/config/mod.rs
+1-1
| @@ -564,7 +564,7 @@ mod tests { | ||
564 | 564 | assert!(!config.disk_bar); |
565 | 565 | assert_eq!(config.bar_width, 15); |
566 | 566 | assert_eq!(config.gap, 3); |
567 | - assert_eq!(config.image_backend, "ascii"); | |
567 | + assert_eq!(config.image_backend, "auto"); | |
568 | 568 | assert_eq!(config.block_range, (0, 15)); |
569 | 569 | } |
570 | 570 | |
571 | 571 | |
▼src/image_cache.rs
+6-1
| @@ -302,7 +302,12 @@ mod tests { | ||
302 | 302 | #[test] |
303 | 303 | fn test_cache_dir_exists() { |
304 | 304 | let dir = cache_dir(); |
305 | - assert!(dir.to_string_lossy().contains("cache")); | |
305 | + // cache_dir() returns either <system_cache>/fetchx or ./fetchx | |
306 | + assert!( | |
307 | + dir.to_string_lossy().contains("fetchx"), | |
308 | + "Cache dir should contain 'fetchx': {:?}", | |
309 | + dir | |
310 | + ); | |
306 | 311 | } |
307 | 312 | |
308 | 313 | #[test] |
309 | 314 | |