Skip to content

Commit

Permalink
fix: Update opaque-types Cargo.toml during release (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomatsubara authored Oct 15, 2024
1 parent 3727cc1 commit e22a311
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ci/scripts/bump-and-tag.bash
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,23 @@ if [[ "$bump_deps_pattern" != '' ]]; then
toml_set_in_place Cargo.toml.in "dependencies.$dep.branch" "$bump_deps_branch"
fi
done
opaque_types_deps=$(toml get build-resources/opaque-types/Cargo.toml dependencies | jq -r "keys[] | select(test(\"$bump_deps_pattern\"))")
for dep in $opaque_types_deps; do
if [[ -n $bump_deps_version ]]; then
toml_set_in_place build-resources/opaque-types/Cargo.toml "dependencies.$dep.version" "$bump_deps_version"
fi

if [[ -n $bump_deps_branch ]]; then
toml_set_in_place build-resources/opaque-types/Cargo.toml "dependencies.$dep.branch" "$bump_deps_branch"
fi
done

# Update lockfile
cargo check
cargo check --manifest-path build-resources/opaque-types/Cargo.toml

if [[ -n $bump_deps_version || -n $bump_deps_branch ]]; then
git commit Cargo.toml Cargo.toml.in Cargo.lock -m "chore: Bump $bump_deps_pattern version to $bump_deps_version"
git commit Cargo.toml Cargo.toml.in Cargo.lock build-resources/opaque-types/Cargo.toml build-resources/opaque-types/Cargo.lock -m "chore: Bump $bump_deps_pattern version to $bump_deps_version"
else
echo "warn: no changes have been made to any dependencies matching $bump_deps_pattern"
fi
Expand All @@ -68,4 +80,4 @@ git tag --force "$version" -m "v$version"
git log -10
git show-ref --tags
git push origin
git push --force origin "$version"
git push --force origin "$version"

0 comments on commit e22a311

Please sign in to comment.