upgrade go1.3 and irc library

This commit is contained in:
Brad Rydzewski 2014-09-09 21:41:11 -07:00
parent 5eb0aab517
commit 3493b868ef
3 changed files with 8 additions and 7 deletions

View file

@ -22,4 +22,4 @@ publish:
access_key: $AWS_KEY
secret_key: $AWS_SECRET
source: debian/drone.deb
target: $DRONE_BRANCH/
target: $DRONE_BRANCH/

View file

@ -17,18 +17,18 @@ type IRC struct {
Channel string `yaml:"channel,omitempty"`
Nick string `yaml:"nick,omitempty"`
Server string `yaml:"server,omitempty"`
Started bool `yaml:"on_started,omitempty"`
Success bool `yaml:"on_success,omitempty"`
Failure bool `yaml:"on_failure,omitempty"`
Started *bool `yaml:"on_started,omitempty"`
Success *bool `yaml:"on_success,omitempty"`
Failure *bool `yaml:"on_failure,omitempty"`
}
func (i *IRC) Send(req *model.Request) error {
switch {
case req.Commit.Status == "Started" && i.Started:
case req.Commit.Status == "Started" && i.Started != nil && *i.Started == true:
return i.sendStarted(req)
case req.Commit.Status == "Success" && i.Success:
case req.Commit.Status == "Success" && i.Success != nil && *i.Success == true:
return i.sendSuccess(req)
case req.Commit.Status == "Failure" && i.Failure:
case req.Commit.Status == "Failure" && i.Failure != nil && *i.Failure == true:
return i.sendFailure(req)
}
return nil

View file

@ -197,6 +197,7 @@ var builders = map[string]*image{
"go1": {Tag: "bradrydzewski/go:1.0"},
"go1.1": {Tag: "bradrydzewski/go:1.1"},
"go1.2": {Tag: "bradrydzewski/go:1.2"},
"go1.3": {Tag: "bradrydzewski/go:1.3"},
// Haskell build images
"haskell": {Tag: "bradrydzewski/haskell:7.4"},