mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
renamed
This commit is contained in:
parent
7610138016
commit
3ce5a430ee
@ -77,7 +77,7 @@ type Project struct {
|
||||
FPM FPM `yaml:"fpm"`
|
||||
|
||||
// test only property:
|
||||
TargetFolder string `yaml:"-"`
|
||||
Dist string `yaml:"-"`
|
||||
}
|
||||
|
||||
// Load config file
|
||||
|
@ -39,7 +39,7 @@ type Archive interface {
|
||||
}
|
||||
|
||||
func create(name string, ctx *context.Context) error {
|
||||
folder := filepath.Join(ctx.Config.TargetFolder, name)
|
||||
folder := filepath.Join(ctx.Config.Dist, name)
|
||||
file, err := os.Create(folder + "." + ctx.Config.Archive.Format)
|
||||
log.Println("Creating", file.Name())
|
||||
if err != nil {
|
||||
|
@ -188,7 +188,7 @@ func dataFor(
|
||||
}
|
||||
sum, err := sha256sum.For(
|
||||
filepath.Join(
|
||||
ctx.Config.TargetFolder,
|
||||
ctx.Config.Dist,
|
||||
file+"."+ctx.Config.Archive.Format,
|
||||
),
|
||||
)
|
||||
|
@ -64,7 +64,7 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
func build(name, goos, goarch string, ctx *context.Context) error {
|
||||
ldflags := ctx.Config.Build.Ldflags + " -X main.version=" + ctx.Version
|
||||
output := filepath.Join(
|
||||
ctx.Config.TargetFolder,
|
||||
ctx.Config.Dist,
|
||||
name,
|
||||
ctx.Config.Build.Binary+extFor(goos),
|
||||
)
|
||||
|
@ -46,7 +46,7 @@ func TestRunFullPipe(t *testing.T) {
|
||||
var pre = filepath.Join(folder, "pre")
|
||||
var post = filepath.Join(folder, "post")
|
||||
var config = config.Project{
|
||||
TargetFolder: folder,
|
||||
Dist: folder,
|
||||
Build: config.Build{
|
||||
Binary: "testing",
|
||||
Flags: "-v",
|
||||
|
@ -82,7 +82,7 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
if ctx.Config.Brew.Install == "" {
|
||||
ctx.Config.Brew.Install = "bin.install \"" + ctx.Config.Build.Binary + "\""
|
||||
}
|
||||
ctx.Config.TargetFolder = "dist"
|
||||
ctx.Config.Dist = "dist"
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
}
|
||||
|
||||
func create(ctx *context.Context, format, archive, arch string) error {
|
||||
var path = filepath.Join(ctx.Config.TargetFolder, archive)
|
||||
var path = filepath.Join(ctx.Config.Dist, archive)
|
||||
var file = path + ".deb"
|
||||
var name = ctx.Config.Build.Binary
|
||||
log.Println("Creating", file)
|
||||
|
@ -89,7 +89,7 @@ func description(diff string) string {
|
||||
|
||||
func upload(ctx *context.Context, client *github.Client, releaseID int, archive, format string) error {
|
||||
archive = archive + "." + format
|
||||
var path = filepath.Join(ctx.Config.TargetFolder, archive)
|
||||
var path = filepath.Join(ctx.Config.Dist, archive)
|
||||
// In case the file doesn't exist, we just ignore it.
|
||||
// We do this because we can get invalid combinations of archive+format here,
|
||||
// like darwinamd64 + deb or something like that.
|
||||
|
Loading…
x
Reference in New Issue
Block a user