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

clean, just in case

This commit is contained in:
Leo Arias 2017-07-27 03:43:53 +00:00
parent e6d85cb40c
commit dd958ff3a6

View File

@ -135,12 +135,18 @@ func create(ctx *context.Context, folder, arch string, binaries []context.Binary
return err
}
snap := metadata.Name + "_" + metadata.Version + "_" + arch + ".snap"
cmd := exec.Command("snapcraft", "snap", "--output", snap)
cmd := exec.Command("snapcraft", "clean")
cmd.Dir = path
if out, err := cmd.CombinedOutput(); err != nil {
return errors.New(string(out))
}
snap := metadata.Name + "_" + metadata.Version + "_" + arch + ".snap"
cmd = exec.Command("snapcraft", "snap", "--output", snap)
cmd.Dir = path
if out, err = cmd.CombinedOutput(); err != nil {
return errors.New(string(out))
}
ctx.AddArtifact(filepath.Join(path, snap))
return nil
}