Commit graph

876 commits

Author SHA1 Message Date
dependabot[bot]
df3a8e21c7
Bump actions/checkout from 2 to 3 (#303)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-20 11:44:52 +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
Jiahao XU
bf700f9012
Improve err msg when source is missing in BinFile::install_bin (#301)
* Improve err msg in `helpers::atomic_install`

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

* Check for missing `source` in `install_bin`

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

* Fix `install_bin`: Use `try_exists` instead of `exists`

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

* Do not test `cargo-deb` in `ci-scripts/tests.sh`

Due to the fact that it uses gnu sparse extension which is not supported
by crate `tar`.

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

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-20 00:25:51 +10:00
Félix Saparelli
763d4610e5
Don't prompt if there's nothing to do (#293)
Fixes #291
2022-08-09 09:09:21 +00:00
github-actions[bot]
4500e4af63
release: v0.12.0 (#253)
Co-authored-by: github-actions <github-actions@github.com>
2022-08-08 23:28:49 +12:00
Jiahao XU
9034f78df4
Merge pull request #282 from cargo-bins/skip-if-already-installed
Skip if already installed and add new cmdline option `--force`
2022-08-08 19:52:52 +10:00
Jiahao XU
a271e695a5
Ignore if package already up-to-date
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 19:18:30 +10:00
Jiahao XU
b69d7e7c06
Test When 0.11.0 is installed but can be upgraded in tests.sh
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:06:36 +10:00
Jiahao XU
36926518cf
Use VersionReqExt::is_latest_compatible in entry:367
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:06:36 +10:00
Jiahao XU
b94dc979ac
Add new trait VersionReqExt and impl it for VersionReq
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:06:34 +10:00
Jiahao XU
d932f1c262
Fix testing skip if installed in ci-scripts/tests.sh
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
4a17460252
Test skip when installed in ci-scripts/tests.sh
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
7f4edfd9f2
log::info! if a crate is skipped due to already installed
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
2c2b3c070f
Skip only if version_req is satisfied
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
431992dab0
Test --version and $crate_name@$version in tests.sh
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
065f62a625
Use VersionReq for Options::version_req and update usage of
`CrateName` in `binstall::install`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
686cae6ae8
Use &VersionReq for param version_req of fetch_crate_cratesio
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:59 +10:00
Jiahao XU
497ef80b27
Take &VersionReq for 1st param of find_version
instead of `&str`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
dd8e6a400d
Rename CrateName::version to version_req and change its type to
`Option<VersionReq>`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
51d6b3039b
Impl new fn helpers::parse_version
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
20c7b61e7a
FIx ci-scripts/tests.sh: Use --force to force installation.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
34f714c64f
Pass --force to cargo-install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
4b79abeedc
Refactor: Run TempDir creation in block_in_place
Since it could also issues blocking operations.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
b8c44839c1
Detect install_path & load metadata in block_in_place
since they involves blocking fs io.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
b4c6db7cda
Refactor & Optimize: Launch target detection as soon as possible
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:58 +10:00
Jiahao XU
4dae214af3
Use block_in_place for loading metadata
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:57 +10:00
Jiahao XU
6716d75607
Minor Refactor: Gather code related to crate_names
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:57 +10:00
Jiahao XU
ac085533cc
Skip crates that are already installed.
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:57 +10:00
Jiahao XU
04fee49c22
Add new option Options::force
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-08 18:05:57 +10:00
Ryan
0bbeecce86
Merge pull request #284 from cargo-bins/split-docs
split docs, first step towards simplifying support instructions
2022-08-08 14:50:21 +12:00
Jiahao XU
1bb2602c86
Merge pull request #287 from cargo-bins/dependabot/cargo/semver-1.0.13
Bump semver from 1.0.12 to 1.0.13
2022-08-08 12:01:47 +10:00
Jiahao XU
cf7c3aec27
Merge pull request #286 from cargo-bins/dependabot/cargo/strum_macros-0.24.3
Bump strum_macros from 0.24.2 to 0.24.3
2022-08-08 12:01:18 +10:00
dependabot[bot]
5b35beb68b
Bump semver from 1.0.12 to 1.0.13
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.12 to 1.0.13.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.12...1.0.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 01:44:57 +00:00
dependabot[bot]
03291c895a
Bump strum_macros from 0.24.2 to 0.24.3
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.2 to 0.24.3.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 01:44:44 +00:00
ryan kurte
5c703f30ca add note about quickinstall / cargo install fallback 2022-08-08 11:42:06 +12:00
Jiahao XU
132c5dfaa9
Merge pull request #280 from cargo-bins/signal-handling
Add Signal handling
2022-08-06 20:13:03 +10:00
Félix Saparelli
68d3ab56f7
Enable sparse registry in CI (#285) 2022-08-06 22:07:24 +12:00
ryan kurte
b3f6eb64ea split docs, first step towards simplifying support instructions 2022-08-06 09:44:17 +12:00
Jiahao XU
5748fd6cf3
Merge pull request #283 from cargo-bins/fix/passing-quiet
Fix passing `--quiet` to `cargo-install`
2022-08-05 16:05:11 +10:00
Jiahao XU
9cb8df1d48
Fix passing --quiet to cargo-install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-05 15:45:46 +10:00
Jiahao XU
b46e54b53a
Merge pull request #281 from cargo-bins/fix-quiet
Improve doc of cmdline option `log_level`, add `--quiet` and pass it to `cargo-install`
2022-08-05 15:35:56 +10:00
Jiahao XU
c352eb00d1
Add missing doc for trace for Options::log_level
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-05 15:24:39 +10:00
Jiahao XU
7a90d4d6c6
Improve help page for Options::log_level
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-05 15:09:40 +10:00
Jiahao XU
8d5f555373
Add new option -q for compatibility with cargo-install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-05 15:02:38 +10:00
Jiahao XU
b6a539735d
Pass -q to cargo-install if log_level is set to off
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:21:29 +10:00
Jiahao XU
3d28549fd6
Apply clippy suggestions in binstall::install
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:18:00 +10:00
Jiahao XU
6685d5a610
Add new option Options::quiet
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:16:45 +10:00
Jiahao XU
62bce2f52f
Improve doc for Options::log_level
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:15:05 +10:00
Jiahao XU
ede134d851
Fix locking of stdou in UIThreadInner
which blocks the printing in main thread and prevents it from exiting.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:04:04 +10:00
Jiahao XU
cea67b2e54
Use std:🧵:spawn in UIThreadInner
instead of `tokio::task::spawn_blocking` so that dropping rt would not
block the main thread until the ui thread is exit (which might never
exit).

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-08-04 23:01:26 +10:00