1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/main.go

34 lines
780 B
Go
Raw Normal View History

2016-12-21 10:35:34 -02:00
package main
import (
2016-12-21 15:03:07 -02:00
"log"
2016-12-21 10:35:34 -02:00
"github.com/goreleaser/releaser/config"
2016-12-30 09:27:35 -02:00
"github.com/goreleaser/releaser/pipeline"
"github.com/goreleaser/releaser/pipeline/brew"
"github.com/goreleaser/releaser/pipeline/build"
"github.com/goreleaser/releaser/pipeline/compress"
"github.com/goreleaser/releaser/pipeline/release"
2016-12-21 10:35:34 -02:00
)
2016-12-29 18:10:11 -02:00
var version = "master"
2016-12-21 14:42:23 -02:00
2016-12-21 10:35:34 -02:00
func main() {
config, err := config.Load("goreleaser.yml")
if err != nil {
2016-12-28 23:46:18 -02:00
log.Fatalln("Failed to load goreleaser.yml:", err.Error())
2016-12-21 10:35:34 -02:00
}
2016-12-31 10:04:24 -02:00
log.Println("Releasing", config.Git.CurrentTag, "...")
2016-12-30 09:27:35 -02:00
var pipeline = []pipeline.Pipe{
build.Pipe{},
compress.Pipe{},
release.Pipe{},
brew.Pipe{},
2016-12-28 22:23:39 -02:00
}
2016-12-30 09:27:35 -02:00
for _, pipe := range pipeline {
2016-12-30 12:41:59 -02:00
if err := pipe.Run(config); err != nil {
2016-12-30 09:27:35 -02:00
log.Fatalln(pipe.Name(), "failed:", err.Error())
2016-12-29 09:58:22 -02:00
}
2016-12-21 15:03:07 -02:00
}
2016-12-21 10:35:34 -02:00
}