Commit graph

936 commits

Author SHA1 Message Date
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
ee340d80b6
Use fork binstall-zip here for new features & updated deps (#375)
* Use fork binstall-zip here for new features & updated deps

Also update zstd to v0.11.2

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

* Update `Cargo.lock`

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

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-17 09:00:16 +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
a611b824fd
docs: fix grammatical error (#386) 2022-09-16 02:55:19 +00:00
azzamsa
a5ffba1ffb
docs: add unsupported crate example (#385) 2022-09-15 21:22:28 +10:00
azzamsa
559c3b8658
docs: add possible values to pgk-fmt argument (#383)
Fixes #378
2022-09-15 07:18:55 +00:00
azzamsa
0e68c0fda3
fix: pkg-fmt parsing should be case insensitive (#384)
Fixes: #377
2022-09-15 02:25:21 +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
Félix Saparelli
9372ea4e53
Fix release script (#368) 2022-09-10 23:59:41 +12:00
Félix Saparelli
b89a4a56b8
Fix (remove) escaping for release blurb in release-pr template (#367) 2022-09-10 23:46:15 +12: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
be8e83b8bd
Update release-pr config (#364) 2022-09-10 06:56:33 +00:00
Félix Saparelli
e25aa50ec9
Rename lib to binstalk (#361) 2022-09-10 16:44:18 +10:00
Jiahao XU
a94d83f0d5
Fix tar by temporarily using a fork (#358)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-10 06:06:22 +00:00
Félix Saparelli
0c6687455f
Trim trailing slash from repo (#360) 2022-09-10 17:32:55 +12:00
Jiahao XU
32c3154abb
Replace dep jobserver with jobslot (#355)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-09 20:46:43 +12:00
Félix Saparelli
56bafc8c9b
Add install recommendation to readme (#351) 2022-09-09 08:27:54 +00: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
23daef610b
Fix .github/scripts/tests.sh: Fix testing for ugprading (#352)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-07 18:46:25 +10:00
Félix Saparelli
bcec382a64
Improve release-pr usage (#350) 2022-09-07 17:40:46 +10:00
Jiahao XU
f7ad78288b
Reuse reqwest client in crates_io_api::AsyncClient (#349) 2022-09-06 16:52:05 +12:00
github-actions[bot]
e7d2eb1aef
release: detect-targets v0.1.2 (#347)
(cargo-release) version 0.1.2

Co-authored-by: github-actions <github-actions@github.com>
2022-09-05 05:14:07 +00:00
Jiahao XU
02df445926
Fix documentation field in detect-targets/Cargo.toml (#346)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-09-05 17:00:36 +12:00
Félix Saparelli
4885cfbb88
Add important usage note for triggering builds to release template (#345) 2022-09-05 04:47:20 +00:00
github-actions[bot]
9b405fc03f
release: detect-targets v0.1.1 (#344)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-05 04:37:14 +00:00
Félix Saparelli
db82c6935f
Deprecate --secure, enforce HTTPS (#343)
Resolves #124
2022-09-05 14:18:14 +10:00
Félix Saparelli
73f7719e53
Recommend taiki-e/install-action (#342)
See #309
2022-09-05 15:12:56 +12:00
github-actions[bot]
eb93eafb9d
release: fs-lock v0.1.0 (#339)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-04 16:04:52 +00:00
Félix Saparelli
a628cbf876
Rename flock to fs-lock (#338) 2022-09-04 15:28:22 +00:00
Félix Saparelli
3387a63895
Fix release PR template (#336) 2022-09-04 15:19:17 +00:00
Jiahao XU
89869db239
Fix doc of desired_targets (#337) 2022-09-04 15:11:28 +00:00
github-actions[bot]
79d4e9b015
release: normalize-path v0.1.0 (#335)
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-04 14:59:51 +00:00
github-actions[bot]
f439767b6f
release: detect-targets v0.1.0 (#333)
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Félix Saparelli <felix@passcod.name>
2022-09-04 14:34:51 +00:00
github-actions[bot]
c3773a4a48
release: detect-wasi v1.0.0 (#332)
Co-authored-by: github-actions <github-actions@github.com>
2022-09-04 13:45:28 +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
Félix Saparelli
f5a682ccce
Stop using borrows of reqwest::Client (#316) 2022-09-04 11:00:33 +00:00
Félix Saparelli
1cf6076d62
Add phantom digest support to download (#315) 2022-09-04 22:47:18 +12:00
Félix Saparelli
280bc974eb
Use release PR action (#330) 2022-09-04 09:38:08 +00:00
Félix Saparelli
0cb4c993b3
Explode out even more variants of default download URLs (#329) 2022-09-02 16:00:46 +12: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
Félix Saparelli
480ea19462
Move internal details of download to be internal to download (#314) 2022-08-31 12:10:03 +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
e39a02aa92
Test default pkg-url for GitLab and BitBucket (#322)
* Test default `pkt-url` for GitLab and BitBucket
* Fail if `cargo-build` is called when testing GitLab/BitBucket
* Fix use of `remote_exists` in `GhCrateMeta::launch_baseline_find_tasks`
   
   If `Method::HEAD` fails, try `Method::GET` since some servers reject
   `Method::HEAD`, e.g. bbuseruploads.s3.amazonaws.com

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 10:45:55 +00:00
Jiahao XU
f973d32ff6
Use BTreeMap in field PkgMeta::overrides (#324) instead of HashMap.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 10:35:11 +00:00
Jiahao XU
7f9ad613a8
Optimize drivers::crates_io::Vfs: Use BTreeMap (#325) instead of HashMap.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 10:18:25 +00:00
Jiahao XU
16b16c482c
Optimize GhCrateMeta::find: use FuturesUnordered (#321)
* Optimize `GhCrateMeta::find` using `FuturesUnordered`
* Optimize `MultiFetcher`: Impl `with_capacity` use it in `resolve_inner` to avoid over-reservation
* Enable feature "std" of dep futures-util

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-27 21:56:43 +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