Do not read Cargo.toml comments in update_crates.sh

This commit is contained in:
fpinto 2023-02-21 10:41:22 +01:00
parent 9e09223e22
commit 2ae11daed3
No known key found for this signature in database
GPG Key ID: F4F06B068FB00692

View File

@ -31,7 +31,7 @@ convert_toml_crates_to_key_value() {
# convert toml crates to key value # convert toml crates to key value
sed -n "/dependencies\]/,/^$/p" "${toml_file}" | sed -n "/dependencies\]/,/^$/p" "${toml_file}" |
grep --extended-regexp --invert-match "^\[|path|^$" | grep --extended-regexp --invert-match "^\[|path|^$|^#" |
cut --delimiter ',' --field 1 | cut --delimiter ',' --field 1 |
sed "s/version//g" | sed "s/version//g" |
tr -d '"{=' | tr -d '"{=' |
@ -150,7 +150,7 @@ main() {
echo -e "\n--------------------------------------------------------" echo -e "\n--------------------------------------------------------"
echo -e "### Crates updates for *Cargo.lock*\n" echo -e "### Crates updates for *Cargo.lock*\n"
cargo update --color always -vv 2>&1 | cargo update --color always -vv 2>&1 |
(grep -Ev "crates.io index|Removing" || true) | (grep -Ev "crates.io index|Removing|^#" || true) |
tr -s ' ' | tr -s ' ' |
sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g" |
sed "s/ Updating //g" | sed "s/ Updating //g" |