From 452beba83d53bd137263191ebbf765440307a40a Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 5 Feb 2015 11:18:06 -0800 Subject: [PATCH 1/3] Update user.go fix migration database issue using zeroisnull --- shared/model/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/model/user.go b/shared/model/user.go index 2b7b5ad15..7f7f9a653 100644 --- a/shared/model/user.go +++ b/shared/model/user.go @@ -20,7 +20,7 @@ type User struct { Created int64 `meddler:"user_created" json:"created_at"` Updated int64 `meddler:"user_updated" json:"updated_at"` Synced int64 `meddler:"user_synced" json:"synced_at"` - TokenExpiry int64 `meddler:"user_access_expires" json:"-"` + TokenExpiry int64 `meddler:"user_access_expires,zeroisnull" json:"-"` } func NewUser(remote, login, email string) *User { From 271974e98fdd1ec5e7216051d3b1ba337536a85e Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 5 Feb 2015 18:48:16 -0800 Subject: [PATCH 2/3] fixed go.rice issue --- plugin/notify/slack.go | 4 +--- server/main.go | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/plugin/notify/slack.go b/plugin/notify/slack.go index 395a4df63..7599ba511 100644 --- a/plugin/notify/slack.go +++ b/plugin/notify/slack.go @@ -98,7 +98,5 @@ func (s *Slack) send(msg string, fallback string, color string) error { return err } - go sendJson(s.WebhookUrl, payload, nil) - - return nil + return sendJson(s.WebhookUrl, payload, nil) } diff --git a/server/main.go b/server/main.go index b5192380c..146bc2ca6 100644 --- a/server/main.go +++ b/server/main.go @@ -125,13 +125,10 @@ func main() { pub = pubsub.NewPubSub() // create handler for static resources - assets := rice.MustFindBox("app").HTTPBox() assetserve := http.FileServer(rice.MustFindBox("app").HTTPBox()) http.Handle("/robots.txt", assetserve) + http.Handle("/", assetserve) http.Handle("/static/", http.StripPrefix("/static", assetserve)) - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - w.Write(assets.MustBytes("index.html")) - }) // create the router and add middleware mux := router.New() From c7c3300350fbdc7bf2aeda90458327d0d87ef67b Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 5 Feb 2015 19:09:52 -0800 Subject: [PATCH 3/3] ensure we hav a .deb file for every drone commit --- .gitignore | 5 +++-- Makefile | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 19c3e825f..6c837086d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,9 @@ drone.sublime-workspace *~ ~* *.sqlite -drone.deb -drone.rpm +*.deb +*.deb.* +*.rpm *.out *.rice-box.go diff --git a/Makefile b/Makefile index 7769a6233..e24c3e709 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,7 @@ deb: --vendor "drone.io" -a amd64 \ --config-files /etc/drone/drone.toml \ packaging/root/=/ + cp packaging/output/drone.deb packaging/output/drone.deb.$(SHA) rpm: fpm -s dir -t rpm -n drone -v $(VERSION) -p packaging/output/drone.rpm \