Merge pull request #354 from amtrack/git-force-push
Fix force option of git/heroku/tsuru deploy plugin
This commit is contained in:
commit
6ef506c1d1
3 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ func (g *Git) Write(f *buildfile.Buildfile) {
|
||||||
// that need to be deployed to git remote.
|
// that need to be deployed to git remote.
|
||||||
f.WriteCmd(fmt.Sprintf("git add -A"))
|
f.WriteCmd(fmt.Sprintf("git add -A"))
|
||||||
f.WriteCmd(fmt.Sprintf("git commit -m 'add build artifacts'"))
|
f.WriteCmd(fmt.Sprintf("git commit -m 'add build artifacts'"))
|
||||||
f.WriteCmd(fmt.Sprintf("git push deploy $COMMIT:%s --force", destinationBranch))
|
f.WriteCmd(fmt.Sprintf("git push deploy HEAD:%s --force", destinationBranch))
|
||||||
case false:
|
case false:
|
||||||
// otherwise we just do a standard git push
|
// otherwise we just do a standard git push
|
||||||
f.WriteCmd(fmt.Sprintf("git push deploy $COMMIT:%s", destinationBranch))
|
f.WriteCmd(fmt.Sprintf("git push deploy $COMMIT:%s", destinationBranch))
|
||||||
|
|
|
@ -30,7 +30,7 @@ func (h *Heroku) Write(f *buildfile.Buildfile) {
|
||||||
// that need to be deployed to Heroku.
|
// that need to be deployed to Heroku.
|
||||||
f.WriteCmd(fmt.Sprintf("git add -A"))
|
f.WriteCmd(fmt.Sprintf("git add -A"))
|
||||||
f.WriteCmd(fmt.Sprintf("git commit -m 'adding build artifacts'"))
|
f.WriteCmd(fmt.Sprintf("git commit -m 'adding build artifacts'"))
|
||||||
f.WriteCmd(fmt.Sprintf("git push heroku $COMMIT:master --force"))
|
f.WriteCmd(fmt.Sprintf("git push heroku HEAD:master --force"))
|
||||||
case false:
|
case false:
|
||||||
// otherwise we just do a standard git push
|
// otherwise we just do a standard git push
|
||||||
f.WriteCmd(fmt.Sprintf("git push heroku $COMMIT:master"))
|
f.WriteCmd(fmt.Sprintf("git push heroku $COMMIT:master"))
|
||||||
|
|
|
@ -30,7 +30,7 @@ func (h *Tsuru) Write(f *buildfile.Buildfile) {
|
||||||
// that need to be deployed to Tsuru.
|
// that need to be deployed to Tsuru.
|
||||||
f.WriteCmd(fmt.Sprintf("git add -A"))
|
f.WriteCmd(fmt.Sprintf("git add -A"))
|
||||||
f.WriteCmd(fmt.Sprintf("git commit -m 'adding build artifacts'"))
|
f.WriteCmd(fmt.Sprintf("git commit -m 'adding build artifacts'"))
|
||||||
f.WriteCmd(fmt.Sprintf("git push tsuru $COMMIT:master --force"))
|
f.WriteCmd(fmt.Sprintf("git push tsuru HEAD:master --force"))
|
||||||
case false:
|
case false:
|
||||||
// otherwise we just do a standard git push
|
// otherwise we just do a standard git push
|
||||||
f.WriteCmd(fmt.Sprintf("git push tsuru $COMMIT:master"))
|
f.WriteCmd(fmt.Sprintf("git push tsuru $COMMIT:master"))
|
||||||
|
|
Loading…
Reference in a new issue