1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

Added install task to make.go

This commit is contained in:
Thomas Boerger 2015-09-16 11:25:58 +02:00
parent 4977375d33
commit dafa042e76

32
make.go
View File

@ -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 {