mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 00:44:55 +03:00
Improve update_crates.sh parsing
This commit is contained in:
parent
529cdcf2ce
commit
39fca161bc
@ -34,10 +34,11 @@ convert_toml_crates_to_key_value() {
|
||||
grep --extended-regexp --invert-match "^\[|path|^$|^#" |
|
||||
cut --delimiter ',' --field 1 |
|
||||
sed "s/version//g" |
|
||||
tr -d '"{=}' |
|
||||
tr -d "'" |
|
||||
tr -s ' ' |
|
||||
sort
|
||||
sed "s/=/ = /g" |
|
||||
tr -d '"{=}' |
|
||||
tr -d "'" |
|
||||
tr -s ' ' |
|
||||
sort
|
||||
}
|
||||
|
||||
get_crate_latest_version() {
|
||||
@ -88,8 +89,8 @@ update_crate_version_in_toml() {
|
||||
toml_file="$4"
|
||||
|
||||
# update crate version in toml
|
||||
sed -i -- "s/${crate} = { version = \"${actual_version}\"/${crate} = { version = \"${last_version}\"/g" "${toml_file}"
|
||||
sed -i -- "s/${crate} = \"${actual_version}\"/${crate} = \"${last_version}\"/g" "${toml_file}"
|
||||
sed -i -- "s/^${crate}.*=.*{.*version.*=.*\"${actual_version}\"/${crate} = { version = \"${last_version}\"/g" "${toml_file}"
|
||||
sed -i -- "s/^${crate}.*=.*\"${actual_version}\"/${crate} = \"${last_version}\"/g" "${toml_file}"
|
||||
if grep --extended-regexp --silent "${crate}.*=.*${last_version}" "${toml_file}"; then
|
||||
echo "${color_blue}updated to ${last_version}${color_reset}"
|
||||
else
|
||||
|
@ -36,7 +36,7 @@ md5 = "0.7.0"
|
||||
percent-encoding = "2.3.1"
|
||||
regex = "1.10.2"
|
||||
serde = "1.0.194"
|
||||
serde_json = { version= "1.0.110",features = ["arbitrary_precision"] }
|
||||
serde_json = { version = "1.0.110", features = ["arbitrary_precision"] }
|
||||
sha2 = "0.10.8"
|
||||
url = "2.5.0"
|
||||
xml-rs = { version = "0.8.19" }
|
||||
|
Loading…
Reference in New Issue
Block a user