Commit graph

200 commits

Author SHA1 Message Date
dependabot[bot]
4e1ac6ee0d
Bump clap from 4.0.10 to 4.0.11 (#474)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.10 to 4.0.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.10...v4.0.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 02:27:06 +00:00
github-actions[bot]
5e04a22c04
release: cargo-binstall v0.15.1 (#470)
Co-authored-by: github-actions <github-actions@github.com>
2022-10-08 18:56:59 +11:00
Jiahao XU
98b62251ad
Fix unit test & integration CI and the release CI (#469)
* Fix integration test: Make sure `cargo build cargo-binstall` would not fail due to binary already present
* Disable feature `zlib-ng` for release build
* Disable build-std for release build on aarch64-unknown-linux-gnu
* Fix clippy warning in unit test CI
* Fix compile-settings.jq
* Fix caching: Rm `restores-keys`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-10-08 20:26:46 +13:00
github-actions[bot]
5d51541dcf
release: cargo-binstall v0.15.0 (#466)
Co-authored-by: github-actions <github-actions@github.com>
2022-10-08 01:10:34 +11:00
github-actions[bot]
65c721f9a1
release: binstalk v0.4.0 (#465)
(cargo-release) version 0.4.0

Co-authored-by: github-actions <github-actions@github.com>
2022-10-08 01:01:03 +11:00
Jiahao XU
76bc030f90
Disable tcp_nodelay for reqwest::Client and add rate limiting for https requests (#458) 2022-10-07 15:51:34 +11:00
dependabot[bot]
8398ec2d4b
Bump clap from 4.0.9 to 4.0.10 (#461)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-06 15:25:12 +13:00
dependabot[bot]
70b0f8ec97
Bump clap from 4.0.8 to 4.0.9 (#460)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.8 to 4.0.9.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.8...v4.0.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 16:04:05 +11:00
dependabot[bot]
51fe4d59e3
Bump clap from 4.0.4 to 4.0.8 (#456)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.4 to 4.0.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.4...v4.0.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 10:07:28 +00:00
Jiahao XU
dcbe701caa
Allow batch installation with cli_overrides (#454)
which allows pkg-fmt, bin-dir and pkg-url to be specified while providing multiple crates to install.

Fixed #444

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-10-03 12:07:16 +13:00
dependabot[bot]
448542f0c8
Bump clap from 4.0.2 to 4.0.4 (#451)
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.2 to 4.0.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.0.2...v4.0.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-30 02:14:10 +00:00
Jiahao XU
aa864fad59
Bump clap to v4.0.2 (#450)
* Rm unused dep clap from crate `binstalk`
* Bump clap to v4.0.2

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-29 03:14:00 +00:00
github-actions[bot]
af3316a8f3
release: cargo-binstall v0.14.0 (#443)
* release: cargo-binstall v0.14.0

* Fix README

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-28 06:41:16 +00:00
github-actions[bot]
a79b880e1e
release: binstalk v0.3.0 (#442)
(cargo-release) version 0.3.0

Co-authored-by: github-actions <github-actions@github.com>
2022-09-28 16:22:14 +10:00
dependabot[bot]
5bb6344987
Bump tokio from 1.21.1 to 1.21.2 (#436)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.1 to 1.21.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.1...tokio-1.21.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-28 01:54:15 +00:00
dependabot[bot]
9ebbf08c63
Bump semver from 1.0.13 to 1.0.14 (#427)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.13...1.0.14)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-26 03:17:12 +00:00
github-actions[bot]
c27c3b80b5
release: cargo-binstall v0.13.3 (#420)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-25 03:23:05 +00:00
github-actions[bot]
20ef4635c4
release: binstalk v0.2.2 (#419)
(cargo-release) version 0.2.2

Co-authored-by: github-actions <github-actions@github.com>
2022-09-25 03:14:13 +00:00
github-actions[bot]
c86cba3cc4
release: cargo-binstall v0.13.2 (#415)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-24 14:21:58 +12:00
github-actions[bot]
480ca8ec19
release: binstalk v0.2.1 (#414)
(cargo-release) version 0.2.1

Co-authored-by: github-actions <github-actions@github.com>
2022-09-24 01:34:52 +00:00
dependabot[bot]
6928dd63dc
Bump clap from 3.2.21 to 3.2.22 (#409)
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.21 to 3.2.22.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.22/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.21...v3.2.22)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-23 04:00:28 +00:00
dependabot[bot]
569cc3816e
Bump clap from 3.2.20 to 3.2.21 (#404)
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.20 to 3.2.21.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.21/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.20...v3.2.21)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 06:01:33 +00:00
dependabot[bot]
e186dfd98d
Bump reqwest from 0.11.11 to 0.11.12 (#405)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.11 to 0.11.12.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.11...v0.11.12)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 05:19:33 +00:00
dependabot[bot]
ab87f19094
Bump tokio from 1.21.0 to 1.21.1 (#401)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.21.0 to 1.21.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.21.0...tokio-1.21.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 14:31:15 +10:00
Félix Saparelli
7816b2162b
Pull cargo-binstall crate readme from root of repo (#398) 2022-09-18 03:57:18 +00:00
github-actions[bot]
e8dfbe3afb
release: cargo-binstall v0.13.1 (#370)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-17 23:35:18 +12:00
github-actions[bot]
d141f4ca81
release: binstalk v0.2.0 (#394)
(cargo-release) version 0.2.0

Co-authored-by: github-actions <github-actions@github.com>
2022-09-17 21:00:43 +10:00
Jiahao XU
7ac55c46f1
Add new feature log_release_max_level_debug and enable it on CI release build (#390)
* Add new feature `log_release_max_level_debug`
* Fix calculation of `log_level` in `logging`
* Enable feature log_release_max_level_debug on CI release build

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-17 09:22:19 +00:00
Jiahao XU
934ccc257b
Support new cmdline option --roots (#389)
* Add new field `Args::roots`
* Use `env::var_os` to fetch `CARGO_INSTALL_ROOTS`
   Previously, it uses `env::var`, which might reject valid path just
   because it is not utf-8 string.
* Update manifest if `CARGO_INSTALL_ROOT` is specified
* Add new fn `install_path::get_cargo_roots_path`
* Fix updating manifest: Use `cargo_roots` instead of default path
* Rm `helpers::statics::cargo_home`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-17 20:34:36 +12:00
azzamsa
559c3b8658
docs: add possible values to pgk-fmt argument (#383)
Fixes #378
2022-09-15 07:18:55 +00:00
Félix Saparelli
757ecfaef8
Fix logging that was broken due to lib rename (#371) 2022-09-10 12:54:31 +00:00
Félix Saparelli
62dc435e3a
Fix bin metadata (#369) 2022-09-10 12:07:19 +00:00
github-actions[bot]
037e62184f
release: cargo-binstall v0.13.0 (#366)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-10 11:07:41 +00:00
github-actions[bot]
22ac1cf5d3
release: binstalk v0.1.0 (#365)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-10 07:11:06 +00:00
Félix Saparelli
e25aa50ec9
Rename lib to binstalk (#361) 2022-09-10 16:44:18 +10:00
Félix Saparelli
e24b2ce1e3
Disable zlib-ng for the default cargo-install build (#354)
but explicitly enable it in our own builds.

This is because using zlib-ng sometimes does not compile easily on Windows,
and using the pure miniz_oxide offers a better install story from source.

For our binary builds, we can provide the optimal performance, and still
do that for most users as they will update with cargo-binstall, getting our
build as a second pass.
2022-09-09 18:06:05 +12:00
Jiahao XU
f7ad78288b
Reuse reqwest client in crates_io_api::AsyncClient (#349) 2022-09-06 16:52:05 +12:00
Félix Saparelli
db82c6935f
Deprecate --secure, enforce HTTPS (#343)
Resolves #124
2022-09-05 14:18:14 +10:00
Félix Saparelli
3387a63895
Fix release PR template (#336) 2022-09-04 15:19:17 +00:00
Félix Saparelli
e21617cc9e
Adapt release workflow for workspace (#331)
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-04 11:12:10 +00:00
Jiahao XU
b330a18d40
Change typeof Args::targets to Option<Vec<String>> (#327)
* Change typeof `Args::targets` to `Option<Vec<String>>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-31 16:48:15 +12:00
Jiahao XU
f38c1e73c3
Ignore trust_dns log output (#323)
* Ignore all log except `binstall` & `cargo_binstall` unless `level` is set to `Trace`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 11:39:12 +00:00
Jiahao XU
305cda3336
Optimize compilation time (#320)
* Print `rerun-if-changed=build.rs` in `build.rs`
* Optimize compile-time: Extract `bin/src/lib.rs`
   
   so that `cargo-binstall (lib)` can be compiled in parallel to other
   deps.
* Refactor: Extract new mod `bin/src/bin_utils.rs`
* Extract new fn `MainExit::new`
* Refactor: Extract new fn `run_tokio_main`
* Handle `Runtime::new` err gracefully in `run_tokio_main`
   instead of `panic!`ing, return the error as `BinstallError`
* Avoid mixing `eprintln` and `error` in `MainExit::report`
* Set profile for `build-override`
   to speedup building of `build.rs` and proc macros.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 23:27:39 +12:00
Jiahao XU
4def4d08fd
Add new feature trust-dns to lib & bin (#318)
* Add new feature `trust-dns` to lib & bin
* Enable `trust-dns` feature by default
   Because the `getaddrinfo` is a poorly designed API.
* USe default feature set on windows CI
   because wintls on the CI does not support TLS 1.3 and trust-dns only
   support dns over https if rustls is used.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-25 12:01:22 +12:00
Jiahao XU
846e7ead91
Support other git hosting services (#312)
* Impl new mod `hosting` for detecting git hosting services
* Refactor: Make `guess_git_hosting_services` associated fn of `GitHostingService`
* Set default value of `PkgMeta::pkg_url` to `None`
* Impl new method `get_redirected_final_url`
* Use `get_redirected_final_url` in `GhCrateMeta::find` to make `guess_git_hosting_services` more accurate.
* Use redirected `repo` in `GhCrateMeta::launch_baseline_find_tasks`
* Refactor `<GhCrateMeta as Fetcher>::find`
* Mod `get_default_pkg_url_template` to ret `&[&str]`
* Add more default `pkg-url` templates
* Rm `pkg-url` in `bin/Cargo.toml`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-24 07:16:26 +00:00
Jiahao XU
62f9450d2d
Refactor: Extract new crate detect-targets and improve code quality (#307)
* Refactor: Extract new crate `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Extract new mod `detect` for `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Extract `desired_targets` in crate `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Extract `detect::linux` in crate `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Extract `detect::macos` in crate `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Extract `detect::windows` in crate `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add new dep cfg-if v1.0.0 for `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Simplify mod declaration in `detect` using `cfg_if!`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor: Simplify `detect_targets` using `cfg_if!`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add crate doc for `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Enable feature "macros" of tokio in `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Enable feature "io-util" of dep tokio

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Rm unused feature "io-util" & "macros" of dep tokio

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Set stdin & stderr to null in `get_target_from_rustc`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve doc of `get_desired_targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve `detect_targets_linux`: Run `ldd` with stdin set to null

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix potential panic in `windows::detect_alternative_targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* FIx fmt of `detect_targets_linux`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Do not re-export dep `detect-targets` in `crates/lib`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix typo in crate doc for `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Enable feature "macros" of tokio in dev mode

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add example to crate doc of `detect-targets`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Improve API `get_desired_targets`: Take `Option<&str>`

instead of `&Option<String>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-21 22:21:33 +10:00
Jiahao XU
1102284684
Fix clippy warnings and add new workflow clippy (#306)
* Derive `Eq` for `PkgFmt`, `PkgFmtDecomposed` & `TarBasedFmt`
* Derive `Eq` for `PkgMeta`, `PkgOverride` & `BinMeta`
* Rm unnecessary reborrow in `install_from_source`
* Rm unnecessary `into()` in `args::parse`
* Fix `clippy` warning in `CratesToml::append_to_path`
* Fix clippy warning in `cratesio_url`
* Fix clippy warning in `detect_targets_linux`
* Add `clippy` and `rustfmt` to workflow `unit-test`

Because `clippy` would not check inactive code disabled by `cfg`, so we
have to also run `clippy` on multiple targets.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-21 02:40:50 +12:00
dependabot[bot]
d9c7bdab55
Bump miette from 5.2.0 to 5.3.0 (#300)
Bumps [miette](https://github.com/zkat/miette) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/zkat/miette/releases)
- [Changelog](https://github.com/zkat/miette/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zkat/miette/compare/miette-derive-v5.2.0...miette-derive-v5.3.0)

---
updated-dependencies:
- dependency-name: miette
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-20 12:16:48 +00:00
dependabot[bot]
af59a59085
Bump clap from 3.2.16 to 3.2.17 (#299)
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-20 12:04:12 +00:00
Félix Saparelli
4b00f5f143
Split crates and clean up structure of codebase (#294)
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-20 11:24:12 +00:00