mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Merge pull request #760 from gdborton/master
Make Heroku destination refspec more specific.
This commit is contained in:
commit
0452090358
2 changed files with 4 additions and 4 deletions
|
@ -44,10 +44,10 @@ 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 HEAD:master --force"))
|
||||
f.WriteCmd(fmt.Sprintf("git push heroku HEAD:refs/heads/master --force"))
|
||||
case false:
|
||||
// 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:refs/heads/master"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ func Test_Heroku(t *testing.T) {
|
|||
|
||||
d.Write(b)
|
||||
out := b.String()
|
||||
g.Assert(strings.Contains(out, "\ngit push heroku $COMMIT:master\n")).Equal(true)
|
||||
g.Assert(strings.Contains(out, "\ngit push heroku $COMMIT:refs/heads/master\n")).Equal(true)
|
||||
})
|
||||
|
||||
g.It("Should force push to remote", func() {
|
||||
|
@ -71,7 +71,7 @@ func Test_Heroku(t *testing.T) {
|
|||
out := b.String()
|
||||
g.Assert(strings.Contains(out, "\ngit add -A\n")).Equal(true)
|
||||
g.Assert(strings.Contains(out, "\ngit commit -m 'adding build artifacts'\n")).Equal(true)
|
||||
g.Assert(strings.Contains(out, "\ngit push heroku HEAD:master --force\n")).Equal(true)
|
||||
g.Assert(strings.Contains(out, "\ngit push heroku HEAD:refs/heads/master --force\n")).Equal(true)
|
||||
})
|
||||
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue