Fix force option of git/heroku/tsuru deploy plugin

The build artifacts were actually not pushed because the HEAD ref before
the commit 'add build artifacts' was used in the git push command.
This commit is contained in:
Matthias Rolke 2014-06-14 13:45:36 +02:00
parent f16101af2c
commit da70994b75
3 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ func (g *Git) Write(f *buildfile.Buildfile) {
// that need to be deployed to git remote.
f.WriteCmd(fmt.Sprintf("git add -A"))
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:
// otherwise we just do a standard git push
f.WriteCmd(fmt.Sprintf("git push deploy $COMMIT:%s", destinationBranch))

View file

@ -30,7 +30,7 @@ func (h *Heroku) Write(f *buildfile.Buildfile) {
// that need to be deployed to Heroku.
f.WriteCmd(fmt.Sprintf("git add -A"))
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:
// otherwise we just do a standard git push
f.WriteCmd(fmt.Sprintf("git push heroku $COMMIT:master"))

View file

@ -30,7 +30,7 @@ func (h *Tsuru) Write(f *buildfile.Buildfile) {
// that need to be deployed to Tsuru.
f.WriteCmd(fmt.Sprintf("git add -A"))
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:
// otherwise we just do a standard git push
f.WriteCmd(fmt.Sprintf("git push tsuru $COMMIT:master"))