Skip to content

Do not attempt deploy without changes.#11

Open
don-code wants to merge 2 commits intoiclanzan:masterfrom
don-code:master
Open

Do not attempt deploy without changes.#11
don-code wants to merge 2 commits intoiclanzan:masterfrom
don-code:master

Conversation

@don-code
Copy link
Copy Markdown

Currently, grunt-git-deploy fails with a nondescript error if there are no changes to be committed:

Running "git_deploy:null_deploy" (git_deploy) task
>> Cannot delete nonexistent file.
Running clone -b gh-pages ../repo . in tmp/grunt-git-deploy
Running checkout -B gh-pages in tmp/grunt-git-deploy
Copying tmp/src to tmp/grunt-git-deploy
>> Cannot delete nonexistent file.
Running add --all in tmp/grunt-git-deploy
Running commit --message=null deploy, should not work in tmp/grunt-git-deploy
Warning:  Use --force to continue.

Aborted due to warnings.

This change instead makes it log out an informational message and proceed, by first running git status to see if any files have changed:

Running "git_deploy:null_deploy" (git_deploy) task
>> Cannot delete nonexistent file.
Running clone -b gh-pages ../repo . in tmp/grunt-git-deploy
Running checkout -B gh-pages in tmp/grunt-git-deploy
Copying tmp/src to tmp/grunt-git-deploy
>> Cannot delete nonexistent file.
Nothing for git_deploy to commit.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant