Commit if modified (#2289)

* Fix paths.

* Fix commit logic - it should commit when there were changes.
This commit is contained in:
Luca Palmieri 2023-02-02 16:34:32 +00:00 committed by GitHub
parent 27429c8b79
commit d9efa6bdd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -13,10 +13,8 @@ mkdir -p "${ARTIFACTS_DIR}"
pushd "${SMITHY_RS_DIR}"
publisher upgrade-runtime-crates-version --version "${SEMANTIC_VERSION}"
if git diff-index --quiet HEAD; then
# The file was actually changed, we need to commit the changes
git commit gradle.properties --message "Upgrade the smithy-rs runtime crates version to ${SEMANTIC_VERSION}"
fi
# The file was actually changed, we need to commit the changes
git diff-index --quiet HEAD || git commit gradle.properties --message "Upgrade the smithy-rs runtime crates version to ${SEMANTIC_VERSION}"
popd
# Clone smithy-rs repo changes (changelog updates) into