diff --git a/make.go b/make.go index 770bcdbd2..04b932d36 100644 --- a/make.go +++ b/make.go @@ -31,6 +31,7 @@ var steps = map[string]step{ "fmt": executeFmt, "test": executeTest, "build": executeBuild, + "install": executeInstall, "image": executeImage, "bindata": executeBindata, "clean": executeClean, @@ -209,6 +210,37 @@ func executeTest() error { "github.com/drone/drone/cmd/...") } +// install step installs the application binaries. +func executeInstall() error { + var bins = []struct { + input string + }{ + { + "github.com/drone/drone/cmd/drone-server", + }, + } + + for _, bin := range bins { + ldf := fmt.Sprintf( + "-X main.revision=%s -X main.version=%s", + sha, + version) + + err := run( + "go", + "install", + "-ldflags", + ldf, + bin.input) + + if err != nil { + return err + } + } + + return nil +} + // build step creates the application binaries. func executeBuild() error { var bins = []struct {