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

33 lines
558 B
Go
Raw Normal View History

2016-12-21 10:35:34 -02:00
package main
import (
"fmt"
2016-12-21 15:03:07 -02:00
"log"
2016-12-21 10:35:34 -02:00
2016-12-21 11:37:31 -02:00
"github.com/goreleaser/releaser/build"
2016-12-21 10:35:34 -02:00
"github.com/goreleaser/releaser/config"
2016-12-21 15:03:07 -02:00
"github.com/goreleaser/releaser/git"
2016-12-21 10:35:34 -02:00
)
2016-12-21 14:42:23 -02:00
var version = "none"
2016-12-21 10:35:34 -02:00
func main() {
config, err := config.Load("goreleaser.yml")
if err != nil {
panic(err)
}
2016-12-21 15:03:07 -02:00
tag, err := git.CurrentTag()
if err != nil {
panic(err)
}
previousTag, err := git.PreviousTag()
diff, err := git.Log(previousTag, tag)
if err != nil {
panic(err)
}
log.Println(diff)
fmt.Println("Building", tag, "...")
err = build.Build(tag, config)
2016-12-21 11:37:31 -02:00
fmt.Println(err)
2016-12-21 10:35:34 -02:00
}