chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
69 stars 16 forks source link

[#63] Added tag support in download progress #64

Closed MitchellBerend closed 1 year ago

MitchellBerend commented 1 year ago

Resolves #63

Added a max_tag_size on SyncProgress to prepare the output message for tags that are longer than normal.

$ cargo run -- --config test-tools.toml sync
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/tool --config test-tools.toml sync`
⛔  bat     asdkjhkasdjfaksjdfhk;j [error] https://api.github.com/repos/sharkdp/bat/releases/tags/asdkjhkasdjfaksjdfhk;j: status code 404
✅  exa     v0.10.1                Completed!
✅  fd      v8.4.0                 Completed!
✅  ripgrep 13.0.0                 Completed!

$ cat test-tools.toml 
# This file was automatically generated by tool-sync
#
store_directory = "./bins"

    [bat]
        owner =     "sharkdp"
        repo =      "bat"
        exe_name =  "bat"
        tag =       "asdkjhkasdjfaksjdfhk;j"
    [exa]
        owner =     "ogham"
        repo =      "exa"
        exe_name =  "exa"
        tag =       "v0.10.1"
    [fd]
        owner =     "sharkdp"
        repo =      "fd"
        exe_name =  "fd"
        tag =       "v8.4.0"
    [ripgrep]
        owner =     "BurntSushi"
        repo =      "ripgrep"
        exe_name =  "rg"
        tag =       "13.0.0"