1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00

fix: allow to publish snaps

This commit is contained in:
Carlos Alexandro Becker 2018-10-20 15:13:31 -03:00 committed by Carlos Alexandro Becker
parent 04ee42caed
commit 3d87275c09
2 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,9 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err
if out, err = cmd.CombinedOutput(); err != nil {
return fmt.Errorf("failed to generate snap package: %s", string(out))
}
if !ctx.Config.Snapcraft.Publish {
return nil
}
ctx.Artifacts.Add(artifact.Artifact{
Type: artifact.PublishableSnapcraft,
Name: folder + ".snap",

View File

@ -217,6 +217,7 @@ type SnapcraftAppMetadata struct {
type Snapcraft struct {
NameTemplate string `yaml:"name_template,omitempty"`
Replacements map[string]string `yaml:",omitempty"`
Publish bool `yaml:",omitempty"`
Name string `yaml:",omitempty"`
Summary string `yaml:",omitempty"`