(cd hwcalc_lib && cargo publish) || exit cargo publish || exit prev_tag="0.1.1" next_tag="0.2.0" changes=$(sed -n "/^## \[$next_tag\].*/,/^## \[$prev_tag\].*/{//!p;}" \ CHANGELOG.md | sed '1d;$d;s/^#\+/#/' ) git tag --edit -m "Release $next_tag" -m "$changes" "$next_tag"