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

fix deploy xxx got not a git repository bug #20

Closed
wants to merge 3 commits into from

Conversation

raiscui
Copy link

@raiscui raiscui commented Oct 7, 2014

fix got
--> Deploying to xxx environment
--> on host xxxxx
Not a git repository

for
#4 (comment)

@timjong93
Copy link

If i'm correct

check_for_local_changes() {
  git --no-pager diff --exit-code --quiet          || abort "commit or stash your changes before deploying"
  git --no-pager diff --exit-code --quiet --cached || abort "commit your staged changes before deploying"
  [ -z "`git rev-list @{upstream}.. -n 1`" ]       || abort "push your changes before deploying"
 }

Does check if there are any changes in your local repository before starting the deploy proces. I also ran into problems with this piece of code. Sometimes you just want to deploy a application on a remote server, this doesn't always have to be the newest version. So if i have any uncommitted changes this shouldn't stop me from doing that.
It is my opinion that it is the users own responsibility to check this.
It might be better to actually remove the whole function, instead of replacing it with a log.
Please correct me if i am wrong.

@raiscui
Copy link
Author

raiscui commented Nov 13, 2014

I'm sure you are right, but no local file in my pc, I just use git url deploy to a pm2 slave pc. no file on my control PC,the git diff never work, sorry my "log "local check"" , I just want to know is this function called.

@timjong93
Copy link

Well what those line of code you are removing are in fact doing is running a git diff command and thereby checking if there have been made any changes in the git repository your ecosystem.json is in since it was last pulled from the remote.
I could imagine that if your ecosystem.json isn't located in your repo this would break.
Apart from that as i explained before i don't think this functionality of checking if there have been any changes made locally is preferable.
So what i suggest is that we create a new pull request in which we remove the whole function and the call to it completely and hope that we have convinced project maintainers to merge this.

@phra
Copy link
Collaborator

phra commented Nov 20, 2017

closing this.

@phra phra closed this Nov 20, 2017
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.

3 participants