Skip to content

Commit

Permalink
Release 0.1.4
Browse files Browse the repository at this point in the history
cargo-crate@0.1.4
lib-cargo-crate@0.1.4

Generated by cargo-workspaces
  • Loading branch information
chevdor committed May 13, 2022
1 parent e1e0b8a commit 7a893a0
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Those will allow you the following calls:

### Help

cargo-crate 0.0.3
cargo-crate 0.1.3
Wilfried Kopp <chevdor@gmail.com>
You can find all available commands below

Expand All @@ -82,7 +82,7 @@ Those will allow you the following calls:

### Info command

cargo-crate-info 0.0.3
cargo-crate-info 0.1.3
Wilfried Kopp <chevdor@gmail.com>
The `info` command returns summarized information

Expand All @@ -93,14 +93,22 @@ Those will allow you the following calls:
<CRATE_NAME>... One or more crate names

OPTIONS:
-h, --help Print help information
-j, --json Output as json
-n, --no-versions Do not show the details about all the older versions
-V, --version Print version information
-h, --help
Print help information

-j, --json
Output as json

-m, --max-versions <MAX_VERSIONS>
Limit the number of versions that are displayed. You can push the limit using this flag
[default: 10]

-V, --version
Print version information

### Open command

cargo-crate-open 0.0.3
cargo-crate-open 0.1.3
Wilfried Kopp <chevdor@gmail.com>
Opens the crate in a browser

Expand All @@ -121,7 +129,7 @@ Those will allow you the following calls:

### Search command

cargo-crate-search 0.0.3
cargo-crate-search 0.1.3
Wilfried Kopp <chevdor@gmail.com>
The `search` command returns a list of crates matching your search pattern

Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-crate"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
description = "A set of crate related cargo commands. You can for instance get the information about a crate, as text or json, including the owners of a crate and its versions."
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion doc/help.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cargo-crate 0.0.3
cargo-crate 0.1.3
Wilfried Kopp <chevdor@gmail.com>
You can find all available commands below

Expand Down
18 changes: 13 additions & 5 deletions doc/usage_info.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cargo-crate-info 0.0.3
cargo-crate-info 0.1.3
Wilfried Kopp <chevdor@gmail.com>
The `info` command returns summarized information

Expand All @@ -9,7 +9,15 @@ ARGS:
<CRATE_NAME>... One or more crate names

OPTIONS:
-h, --help Print help information
-j, --json Output as json
-n, --no-versions Do not show the details about all the older versions
-V, --version Print version information
-h, --help
Print help information

-j, --json
Output as json

-m, --max-versions <MAX_VERSIONS>
Limit the number of versions that are displayed. You can push the limit using this flag
[default: 10]

-V, --version
Print version information
2 changes: 1 addition & 1 deletion doc/usage_open.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cargo-crate-open 0.0.3
cargo-crate-open 0.1.3
Wilfried Kopp <chevdor@gmail.com>
Opens the crate in a browser

Expand Down
2 changes: 1 addition & 1 deletion doc/usage_search.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cargo-crate-search 0.0.3
cargo-crate-search 0.1.3
Wilfried Kopp <chevdor@gmail.com>
The `search` command returns a list of crates matching your search pattern

Expand Down
9 changes: 5 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
VERSION := `toml get cli/Cargo.toml package.version | jq -r`
export TAG:=`toml get cli/Cargo.toml package.version | jq -r .`
default_bump := 'patch'

# List available commands
_default:
Expand Down Expand Up @@ -32,11 +33,11 @@ _fmt:
_clippy:
cargo +nightly clippy --all-features --all-targets

_deny:
deny:
cargo deny check

# Run checks such as clippy, rustfmt, etc...
check: _clippy _fmt _deny
check: _clippy _fmt

# Minor bump, can be used once the release is ready
bump:
Expand All @@ -56,8 +57,8 @@ md:
#!/usr/bin/env bash
asciidoctor -b docbook -a leveloffset=+1 -o - README_src.adoc | pandoc --markdown-headings=atx --wrap=preserve -t markdown_strict -f docbook - > README.md

release: check test_all bump doc md
cargo publish
release bump=default_bump: check test_all doc md
cargo workspaces publish {{bump}}

tag:
#!/bin/sh
Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lib-cargo-crate"
version = "0.1.3"
version = "0.1.4"
edition = "2021"
license = "MIT"
description = "a lib for cargo-crate"
Expand Down
2 changes: 1 addition & 1 deletion lib/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl Info {
let wv: WrappedVersion = WrappedVersion::from(v);
println!("{}", wv);
});
let total: u64 = r.krate.versions.len().try_into().unwrap_or_else(|_x| u64::MAX);
let total: u64 = r.krate.versions.len().try_into().unwrap_or(u64::MAX);
if total > options.max_versions {
println!("... and {} more", total - options.max_versions)
}
Expand Down

0 comments on commit 7a893a0

Please sign in to comment.