Skip to content

Commit

Permalink
Match the first version encountered in Cargo.toml
Browse files Browse the repository at this point in the history
Won't increment other top level version lines (for dependencies etc)
  • Loading branch information
skeet70 committed Jan 14, 2025
1 parent edfc072 commit 04d5aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/bump-version.set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for FILE in ${VERSFILES} ; do
;;

Cargo.toml)
sed 's/^version = ".*"$/version = "'"${NEWVERS}"'"/' "${FILE}" > "${FILE}.tmp"
sed '0,/version/s/^version = ".*"$/version = "'"${NEWVERS}"'"/' "${FILE}" > "${FILE}.tmp"
mv "${FILE}.tmp" "${FILE}"

# If there's a Cargo.lock, update it also.
Expand Down

0 comments on commit 04d5aa5

Please sign in to comment.