Commit graph

171 commits

Author SHA1 Message Date
Félix Saparelli
b4df4d0de3
Update deps 2022-06-08 16:54:42 +12:00
Félix Saparelli
d59fd60e8a
Set MSRV
Not as policy, just because we use 1.61.0 features
2022-06-08 16:39:35 +12:00
Félix Saparelli
bd562924a2
Switch to edition 2021 2022-06-08 16:38:09 +12:00
Félix Saparelli
d58ce3892a
Use clap3 2022-06-07 23:56:24 +12:00
Félix Saparelli
0c83d010b1
Merge pull request #160 from NobodyXu/feature/target-detection 2022-06-07 14:41:03 +12:00
Félix Saparelli
ee03e971f0
Merge pull request #158 from ryankurte/dependabot/cargo/tokio-1.19.1 2022-06-07 14:25:27 +12:00
Jiahao XU
9c818e0e95
Remove dep arrayvec
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-07 12:21:03 +10:00
Jiahao XU
7a244176b4
Reorder dep in Cargo.toml
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-07 11:48:19 +10:00
Jiahao XU
1ebc759b17
Add dep arrayvec v0.7.2
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-06 22:45:06 +10:00
Jiahao XU
ca5c9b7c23
Add dep guess_host_triple for target_os macos
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-06-06 22:35:51 +10:00
dependabot[bot]
fe551438a0
Bump async-trait from 0.1.53 to 0.1.56
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.53 to 0.1.56.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.53...0.1.56)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 01:25:44 +00:00
dependabot[bot]
962e68f786
Bump tokio from 1.18.2 to 1.19.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.18.2 to 1.19.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.18.2...tokio-1.19.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 01:25:38 +00:00
Félix Saparelli
6457ab9b64
(cargo-release) version 0.8.0 2022-06-01 01:30:48 +12:00
Félix Saparelli
73b3ac1adb
Drop tokio macros 2022-06-01 00:30:28 +12:00
Félix Saparelli
c0eaffb05d
Refactor for rich errors, split user abort and genuine error 2022-06-01 00:29:14 +12:00
Jiahao XU
fff4b72256
Enable feature zlib-ng of flate2 so that zlib-ng is used
which is the fastest implementation flate2 supports.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 21:45:12 +10:00
Jiahao XU
20b2c37ffb
Bump dep flate2 to v1.0.24
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 21:45:11 +10:00
Jiahao XU
355895d8b6
Disable all features of zip except deflate, bzip2 and zstd
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 21:45:10 +10:00
Jiahao XU
91bb84d5a8
Optimize dep tokio: Disable all feature except rt-multi-thread, macros
and process

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 21:44:20 +10:00
Félix Saparelli
db3f12c3ea
Merge pull request #148 from NobodyXu/feature/zstd 2022-05-31 23:02:16 +12:00
Jiahao XU
84d8b9295f
Set profile.release.strip to symbols in Cargo.toml
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 17:39:33 +10:00
Jiahao XU
c989ed0823
Optimize release build
by enabling lto, setting `codegen-units` to 1 and setting panic behavior
to `abort`.

On my `aarch64-apple-darwin` with `rustc 1.61.0`, this reduces the size
of binary from 7.8M to 4.9M

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 17:12:15 +10:00
Jiahao XU
9e35efbd10
Add new dep zstd v0.10.0
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2022-05-31 16:43:45 +10:00
Félix Saparelli
e8464aba3d
Use tempfile over tempdir
Closes #135
2022-05-31 17:37:34 +12:00
Christof Weickhardt
256e695aa5 feat: remove crates-index dependency 2022-05-01 07:45:23 +00:00
Christof Weickhardt
62577a72f3 feat: use rustls for crates_io_api 2022-04-30 09:24:32 +00:00
Félix Saparelli
77f51aff84 (cargo-release) version 0.7.0 2022-04-29 10:23:52 +12:00
Félix Saparelli
eeaba76b5f
Fallback to installing from source (#114)
Closes #108
2022-04-29 10:15:43 +12:00
Félix Saparelli
d68b0a209a
Clarify --version usage and add a warning at runtime (#116)
Fixes #113
2022-04-29 09:33:54 +12:00
Félix Saparelli
5506ffb5d0 (cargo-release) version 0.6.2 2022-02-16 22:44:10 +13:00
Félix Saparelli
49f3489398 (cargo-release) version 0.6.1 2022-02-16 22:11:55 +13:00
Félix Saparelli
7a1d8b42dd Revert Cargo.toml to {format} to allow self-upgrade 2022-02-16 22:06:03 +13:00
Félix Saparelli
232a4c06a9 (cargo-release) version 0.6.0 2022-02-16 21:46:48 +13:00
Félix Saparelli
6dcb1dd1b4
Split {format} and allow use of {binary-ext} in pkg-url (#95)
This from feedback in #19:

> wrt. bin-dir and bin-path, this appears to be a typo / should all be called bin-dir

This is only a readme fix afaict, I changed all occurences of `bin-path` in there to `bin-dir`.

> wrt. format, those are actually two (unfortunately named) different concepts, the first
refers to the archive format (eg. .tgz), the second to the binary format (which needs a .exe
appended for windows).

This introduces two new substitutions:
- `binary-ext` is the old "`format` in `bin-dir`"
- `archive-format` is the old "`format` in `pkg-url`"

Contents are unchanged: `binary-ext` includes the dot, `archive-format` doesn't. That
makes it easy to upgrade and also personally I slightly prefer it that way.

The old contextual `format` is still available, "soft deprecated": it will be accepted silently
so everything will work, but all documentation will use the new syntax. In the future we
could move to a "hard deprecated" model where installing a package that uses `format`
will warn the user / tell them to report that to the maintainer. I don't think we'll ever really
be able to remove it but that should be good enough.

A cool new feature is that `binary-ext` is now usable in `pkg-url`, which will be useful for raw binary downloads:

```toml
pkg_url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }{ binary-ext }"
```

I've also added a bunch of tests to GhCrateMeta around the templating for `pkg-url`.
2022-02-16 16:18:35 +13:00
Félix Saparelli
370ae05620
QuickInstall support (#94)
See this issue: https://github.com/alsuren/cargo-quickinstall/issues/27

Quick Install is a hosted repo of built crates, essentially. The approach I've taken here is
a list of strategies:

1. First, we check the crate meta or default and build the URL to the repo. Once we have
   that, we perform a `HEAD` request to the URL to see if it's available.
2. If it's not, we build the URL to the quickinstall repo, and perform a `HEAD` to there.

As soon as we've got a hit, we use that. I've built it so it's extensible with more strategies.
This could be useful for #4.

This also adds a prompt before downloading from third-party sources, and logs a short
name for a source, which is easier to glance than a full URL, and includes a quick refactor
of the install/link machinery.
2022-02-16 14:49:07 +13:00
Félix Saparelli
e691255650 Update deps 2022-02-16 11:12:25 +13:00
Félix Saparelli
0b27ac4c80
Merge branch 'main' into dependabot/cargo/anyhow-1.0.51 2021-12-08 13:01:54 +13:00
Félix Saparelli
f277b5094e
Merge pull request #76 from ryankurte/dependabot/cargo/strum_macros-0.23.1 2021-12-08 13:00:56 +13:00
Félix Saparelli
c74986b85b
Merge pull request #79 from ryankurte/dependabot/cargo/reqwest-0.11.7 2021-12-08 12:35:05 +13:00
dependabot[bot]
712a63fc84
Bump anyhow from 1.0.45 to 1.0.51
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.45 to 1.0.51.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.45...1.0.51)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 01:14:55 +00:00
dependabot[bot]
f7528b7004
Bump reqwest from 0.11.6 to 0.11.7
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.6 to 0.11.7.
- [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.6...v0.11.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 01:14:45 +00:00
dependabot[bot]
9b092b9f9e
Bump cargo_toml from 0.10.1 to 0.10.2
Bumps [cargo_toml](https://gitlab.com/crates.rs/cargo_toml) from 0.10.1 to 0.10.2.
- [Release notes](https://gitlab.com/crates.rs/cargo_toml/tags)
- [Commits](https://gitlab.com/crates.rs/cargo_toml/commits/master)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 01:14:41 +00:00
dependabot[bot]
c46eda2b54
Bump strum_macros from 0.23.0 to 0.23.1
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.23.0 to 0.23.1.
- [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>
2021-11-22 01:14:07 +00:00
ryan kurte
912dc56c95 (cargo-release) version 0.5.0 2021-11-19 09:37:35 +13:00
Félix Saparelli
0f9b4de449 Update deps 2021-11-17 21:53:20 +13:00
ryan kurte
5c56c930e4 (cargo-release) version 0.4.1 2021-10-08 12:28:56 +13:00
ryan kurte
87449e29e7 Swap macos to zip, update binary lookup for binstall 2021-10-08 11:38:38 +13:00
ryan
7d0b700ae2 (cargo-release) version 0.3.0 2021-04-08 22:31:07 +12:00
ryan
ddadcd6d32 bump tokio/reqwest and swap to rustls / remove openssl 2021-04-08 18:55:08 +12:00
ryan
1c25b1346f added zip support, pkg-fmt override
swapped CI to build zips for windows
2021-04-08 18:39:54 +12:00