fix: use B suffix for sizes
This makes it clearer that we are talking about bytes c:
This commit is contained in:
parent
1ec7c2a0df
commit
7253c64753
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ util_path="${GITHUB_ACTION_PATH:-.}/utils.sh"
|
||||||
json_to_md_rows() {
|
json_to_md_rows() {
|
||||||
jq --raw-output \
|
jq --raw-output \
|
||||||
".$1[]"' | "| `\(.name)` | \(.size) | \(.narSize) |"' "$2" |
|
".$1[]"' | "| `\(.name)` | \(.size) | \(.narSize) |"' "$2" |
|
||||||
numfmt --to=iec-i --field=4,6
|
numfmt --suffix=B --to=iec-i --field=4,6
|
||||||
}
|
}
|
||||||
|
|
||||||
# USAGE: json_to_md_rows <FIELD> [JSON_FILE]
|
# USAGE: json_to_md_rows <FIELD> [JSON_FILE]
|
||||||
|
@ -22,7 +22,7 @@ json_to_md_rows() {
|
||||||
json_to_md_rows_and_change() {
|
json_to_md_rows_and_change() {
|
||||||
jq --raw-output \
|
jq --raw-output \
|
||||||
".$1[]"' | "| `\(.name)` | \(.size) | \(.sizeChange) | \(.narSize) | \(.narSizeChange) |"' |
|
".$1[]"' | "| `\(.name)` | \(.size) | \(.sizeChange) | \(.narSize) | \(.narSizeChange) |"' |
|
||||||
numfmt --to=iec-i --field=4,6,8,10
|
numfmt --suffix=B --to=iec-i --field=4,6,8,10
|
||||||
}
|
}
|
||||||
|
|
||||||
# USAGE: has_elements <FIELD> <JSON_FILE>
|
# USAGE: has_elements <FIELD> <JSON_FILE>
|
||||||
|
|
Loading…
Reference in a new issue