Skip to content

Commit

Permalink
Commit if modified (#2289)
Browse files Browse the repository at this point in the history
* Fix paths.

* Fix commit logic - it should commit when there were changes.
  • Loading branch information
LukeMathWalker authored Feb 2, 2023
1 parent 27429c8 commit d9efa6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/ci-scripts/upgrade-gradle-properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d9efa6b

Please sign in to comment.