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:
parent
4977375d33
commit
dafa042e76
32
make.go
32
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user