feat: Auto commit cargo hakari generate changes

pull/24376/head
Carol (Nichols || Goulding) 2022-02-10 11:29:00 -05:00
parent 677a272095
commit 26b9ad812e
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
1 changed files with 21 additions and 10 deletions

View File

@ -170,19 +170,30 @@ jobs:
- rust_components
- cache_restore
- run:
name: Check that the workspace hack crate contains all features in use
name: Configure git
command: |
cargo hakari generate --diff || {
echo "If this fails, fix it by running \`cargo hakari generate\` locally and committing the changes"
exit 1
}
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
git config user.name "dependabot[bot]"
- run:
name: Check that all crates in the workspace depend on the workspace hack crate
name: Commit any changes to the features in the workspace hack crate
command: |
cargo hakari manage-deps --dry-run || {
echo "If this fails, fix it by running \`cargo hakari manage-deps\` locally and committing the changes"
exit 1
}
cargo hakari generate
if [[ $(git status --porcelain) ]] ; then
git commit -am "[skip ci] Run cargo hakari generate"
git push origin "$CIRCLE_BRANCH"
else
echo "No changes to commit"
fi
- run:
name: Commit any changes to crates so they all depend on the workspace hack crate
command: |
cargo hakari manage-deps
if [[ $(git status --porcelain) ]] ; then
git commit -am "[skip ci] Run cargo hakari manage-deps"
git push origin "$CIRCLE_BRANCH"
else
echo "No changes to commit"
fi
test:
# setup multiple docker images (see https://circleci.com/docs/2.0/configuration-reference/#docker)