From 3fb8ff6b01a18b1b7502cf05910e57dac73f34ff Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Thu, 7 Sep 2023 17:15:33 +0530 Subject: [PATCH 1/3] Commit build files only if untracked files are present. --- deploy.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 From 5c3803f8698afd1ded5760f56cfa2c1848848f74 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 7 Sep 2023 11:09:11 -0600 Subject: [PATCH 2/3] Update the changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0467012..3e2eb5d 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)). From faf1890045dc96dd90182abbeeb01afde963c0c2 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Thu, 7 Sep 2023 11:10:39 -0600 Subject: [PATCH 3/3] Add link to release --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e2eb5d..51c2027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,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