Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

aquifer deploy-git fails with a non-descript error code when there are no changes to commit #30

Open
heydemo opened this issue Mar 8, 2017 · 5 comments

Comments

@heydemo
Copy link

heydemo commented Mar 8, 2017

I believe this is because running a git commit with no files staged returns 1. This is breaking out builds on CircleCi.

postBuild sync complete.
Copying deployment files...
Clearing the index...
Adding all files to the index...
Committing changes...
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
gitcommand exited with code 1

@chasingmaxwell
Copy link
Member

I think this is a legitimate failure. If you try to deploy and there was nothing to commit, you should know that the deploy did not occur. This probably needs to be handled in the build and not as a change to aquifer-git.

@chasingmaxwell
Copy link
Member

Closing this, but if you're unconvinced, feel free to re-open :)

@heydemo
Copy link
Author

heydemo commented Mar 8, 2017

@chasingmaxwell thanks for quick response

My thinking is a lack of new files to commit should not error out, similar to how git push will return an error code of 0 if no files to push. I could do something like: aquifer deploy-git || true in our circle.yml - but then it wouldn't error out on other failures

@chasingmaxwell
Copy link
Member

We had a discussion about this outside of GitHub, the result of which is that deploy-git should error out with dependable and distinct error codes so this situation can be handled properly.

@chasingmaxwell chasingmaxwell reopened this Mar 8, 2017
@chasingmaxwell chasingmaxwell changed the title aquifer deploy-git fails when no files to commit aquifer deploy-git fails with a non-descript error code when there are no changes to commit Mar 8, 2017
@chasingmaxwell
Copy link
Member

Changed the title to describe the issue more accurately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants