File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ check-changes () {
3131 }
3232}
3333
34+ crate-names () {
35+ cargo metadata --format-version 1 --no-deps | jq -r ' .packages[].name'
36+ }
37+
3438auto-pr () {
3539 pr_url=$(( gh pr view -- json url, closed 2 >/ dev/ null || true) \
3640 | jq -r 'select(.closed | not) | .url')
@@ -101,8 +105,23 @@ awk-in-place Cargo.toml '
101105 }
102106 { print }'
103107
108+ # Fix docs.rs links in README, if present
109+ for name in $(crate-names) ; do
110+ awk-in-place README.md '{
111+ sub(/https:\/\/docs\.rs\/'"$name "'\/[0 -9 ]+.[0 -9 ]+.[0 -9 ]+\//, \
112+ "https://docs.rs/'"$name "'/'$version '/")
113+ print
114+ }'
115+ done
116+
104117cargo check --quiet
105118
119+ # Do semver checks only if there is a version on crates.io to compare to.
120+ # FIXME: can’t tell if crates.io search failed for another reason.
121+ if (cd / && cargo info "$(crate-names | head -1 )" &>/dev/null) ; then
122+ cargo semver-checks || { echo ; confirm 'Release anyway?' ; }
123+ fi
124+
106125awk-in-place CHANGELOG.md '
107126 /^## / && !done {
108127 $0 = "## Release '$version ' ('$(date +%Y-%m-%d)')"
You can’t perform that action at this time.
0 commit comments