Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not attempt deploy without changes. #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

don-code
Copy link

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