Skip to content

Commit

Permalink
[#85] Add just, hyperfine, k9s, and procs (#147)
Browse files Browse the repository at this point in the history
Parts of #85

i found that procs zip file is not easy to support yet, so i opened a PR
there and we will wait for their next release.

### Additional tasks

- [x] Updated CHANGELOG.md

hope this helps!
  • Loading branch information
hdhoang authored Oct 21, 2022
1 parent 395b21c commit f9b71cf
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ jobs:
if [[ ! -x $SYNC_DIR/rg ]]; then echo "error on: rg"; false; fi
if [[ ! -x $SYNC_DIR/tool ]]; then echo "error on: tool"; false; fi
if [[ ! -x $SYNC_DIR/gh ]]; then echo "error on: gh"; false; fi
if [[ ! -x $SYNC_DIR/hyperfine ]]; then echo "error on: hyperfine"; false; fi
if [[ ! -x $SYNC_DIR/just ]]; then echo "error on: just"; false; fi
if [[ ! -x $SYNC_DIR/k9s ]]; then echo "error on: k9s"; false; fi
if [[ ! -x $SYNC_DIR/procs ]]; then echo "error on: procs"; false; fi
# disabled because of: https://github.com/alexcrichton/tar-rs/issues/295
# if [[ ! -x $SYNC_DIR/tokei ]]; then echo "error on: tokei"; false; fi
Expand Down Expand Up @@ -164,6 +168,19 @@ jobs:
if (!(Test-Path $env:SYNC_DIR\gh.exe)) {
throw 'error on gh.exe'
}
if (!(Test-Path $env:SYNC_DIR\hyperfine.exe)) {
throw 'error on hyperfine.exe'
}
if (!(Test-Path $env:SYNC_DIR\just.exe)) {
throw 'error on just.exe'
}
if (!(Test-Path $env:SYNC_DIR\k9s.exe)) {
throw 'error on k9s.exe'
}
if (!(Test-Path $env:SYNC_DIR\procs.exe)) {
throw 'error on procs.exe'
}
rustfmt:
name: rustfmt
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ available [on GitHub][2].
* [#133](https://github.com/chshersh/tool-sync/issues/133)
Added shell completion
(by [@MitchellBerend][MitchellBerend])
* [#147](https://github.com/chshersh/tool-sync/issues/147)
Supports casey/just, dalance/procs, derailed/k9s, and
sharkdp/hyperfine natively.
(by [@hdhoang][hdhoang])


### Fixed
Expand Down
48 changes: 48 additions & 0 deletions src/sync/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,54 @@ pub fn build_db() -> BTreeMap<String, ToolInfo> {
tag: ToolInfoTag::Latest,
},
);
tools.insert(
"hyperfine",
StaticToolInfo {
owner: "sharkdp",
repo: "hyperfine",
exe_name: "hyperfine",
linux: "x86_64-unknown-linux-musl",
macos: "x86_64-apple-darwin",
windows: "x86_64-pc-windows-msvc",
tag: ToolInfoTag::Latest,
},
);
tools.insert(
"just",
StaticToolInfo {
owner: "casey",
repo: "just",
exe_name: "just",
linux: "x86_64-unknown-linux-musl",
macos: "x86_64-apple-darwin",
windows: "x86_64-pc-windows-msvc",
tag: ToolInfoTag::Latest,
},
);
tools.insert(
"k9s",
StaticToolInfo {
owner: "derailed",
repo: "k9s",
exe_name: "k9s",
linux: "Linux_x86_64",
macos: "Darwin_x86_64",
windows: "Windows_x86_64",
tag: ToolInfoTag::Latest,
},
);
tools.insert(
"procs",
StaticToolInfo {
owner: "dalance",
repo: "procs",
exe_name: "procs",
linux: "x86_64-linux",
macos: "x86_64-mac",
windows: "x86_64-windows.zip",
tag: ToolInfoTag::Latest,
},
);
tools.insert(
"ripgrep",
StaticToolInfo {
Expand Down
4 changes: 4 additions & 0 deletions tests/default-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
# [exa] # https://github.com/ogham/exa
# [fd] # https://github.com/sharkdp/fd
# [github] # https://github.com/cli/cli
# [hyperfine] # https://github.com/sharkdp/hyperfine
# [just] # https://github.com/casey/just
# [k9s] # https://github.com/derailed/k9s
# [procs] # https://github.com/dalance/procs
# [ripgrep] # https://github.com/BurntSushi/ripgrep
# [tool-sync] # https://github.com/chshersh/tool-sync
#
Expand Down
4 changes: 4 additions & 0 deletions tests/sync-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ store_directory = "sync-full"
[ripgrep]
[tool-sync]
[github]
[hyperfine]
[just]
[k9s]
[procs]

#disabled because of: https://github.com/alexcrichton/tar-rs/issues/295
# [tokei]

0 comments on commit f9b71cf

Please sign in to comment.