Skip to content

Commit

Permalink
[#46] Support tool-sync by tool-sync (#47)
Browse files Browse the repository at this point in the history
Resolves #46
  • Loading branch information
chshersh authored Aug 29, 2022
1 parent 3305d0f commit cb339b0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
if [[ ! -x $SYNC_DIR/exa ]]; then echo "error on: exa"; false; fi
if [[ ! -x $SYNC_DIR/fd ]]; then echo "error on: fd"; false; fi
if [[ ! -x $SYNC_DIR/rg ]]; then echo "error on: rg"; false; fi
if [[ ! -x $SYNC_DIR/tool ]]; then echo "error on: tool"; 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 @@ -106,6 +107,9 @@ jobs:
if (!(Test-Path $env:SYNC_DIR\rg.exe)) {
throw 'error on rg.exe'
}
if (!(Test-Path $env:SYNC_DIR\tool.exe)) {
throw 'error on tool.exe'
}
rustfmt:
name: rustfmt
Expand Down
10 changes: 10 additions & 0 deletions src/sync/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ pub fn lookup_tool(tool_name: &str) -> Option<ToolInfo> {
windows: Some("x86_64-pc-windows-msvc".to_string()),
},
}),
"tool-sync" => Some(ToolInfo {
owner: "chshersh".to_string(),
repo: "tool-sync".to_string(),
exe_name: "tool".to_string(),
asset_name: AssetName {
linux: Some("x86_64-unknown-linux-gnu".to_string()),
macos: Some("x86_64-apple-darwin".to_string()),
windows: Some("x86_64-pc-windows-msvc".to_string()),
},
}),
// "tokei" => Some(ToolInfo {
// owner: "XAMPPRocky".to_string(),
// repo: "tokei".to_string(),
Expand Down
1 change: 1 addition & 0 deletions tests/full-database.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ store_directory = "full-database"
[exa]
[fd]
[ripgrep]
[tool-sync]

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

0 comments on commit cb339b0

Please sign in to comment.