Make curl fail on errors in xtask publish-release-notes

This commit is contained in:
Noritada Kobayashi 2022-12-13 13:05:11 +09:00
parent 86621a7cc0
commit c7c6c6b814

View File

@ -57,7 +57,7 @@ fn update_release(sh: &Shell, tag_name: &str, release_notes: &str) -> Result<()>
let release_json = cmd!(
sh,
"curl -s -H {accept} -H {authorization} -H {api_version} {release_url}/tags/{tag_name}"
"curl -sf -H {accept} -H {authorization} -H {api_version} {release_url}/tags/{tag_name}"
)
.read()?;
let release_id = cmd!(sh, "jq .id").stdin(release_json).read()?;
@ -72,7 +72,7 @@ fn update_release(sh: &Shell, tag_name: &str, release_notes: &str) -> Result<()>
.bool("prerelease", false);
let _ = cmd!(
sh,
"curl -s -X PATCH -H {accept} -H {authorization} -H {api_version} {release_url}/{release_id} -d {patch}"
"curl -sf -X PATCH -H {accept} -H {authorization} -H {api_version} {release_url}/{release_id} -d {patch}"
)
.read()?;