diff --git a/CHANGELOG.md b/CHANGELOG.md index 0467012..51c2027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] - TBD +## [2.2.2] - 2023-09-07 +### Fixed +- Ensure the deploy action works properly when a `.distignore` file is not present (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#137](https://github.com/10up/action-wordpress-plugin-deploy/pull/137)). + ## [2.2.1] - 2023-09-05 ### Fixed - Ensure built files are included when used without a `BUILD_DIR` and `.distignore` file (props [@akirk](https://github.com/akirk), [@iamdharmesh](https://github.com/iamdharmesh) via [#130](https://github.com/10up/action-wordpress-plugin-deploy/pull/130)). @@ -79,6 +83,7 @@ All notable changes to this project will be documented in this file, per [the Ke - Use more robust method of copying files (`-c` flag for `rsync`). [Unreleased]: https://github.com/10up/action-wordpress-plugin-deploy/compare/stable...develop +[2.2.2]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.1...2.2.2 [2.2.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.0...2.2.1 [2.2.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.1...2.2.0 [2.1.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.0...2.1.1 diff --git a/deploy.sh b/deploy.sh index a843ba7..50af5f6 100755 --- a/deploy.sh +++ b/deploy.sh @@ -114,9 +114,11 @@ if [[ "$BUILD_DIR" = false ]]; then git config --global user.name "10upbot on GitHub" # Ensure git archive will pick up any changed files in the directory try. - test $(git ls-files --deleted) && git rm $(git ls-files --deleted) - git add . - git commit -m "Include build step changes" + test $(git ls-files --deleted) && git rm $(git ls-files --deleted) + if [ -n "$(git status --porcelain --untracked-files=all)" ]; then + git add . + git commit -m "Include build step changes" + fi # If there's no .gitattributes file, write a default one into place if [[ ! -e "$GITHUB_WORKSPACE/.gitattributes" ]]; then