From 5ff07c38ea2a10df3962d1114d06a1bf69f8504a Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 17 Dec 2017 22:12:25 -0200 Subject: [PATCH] fix: cleaning up --- pipeline/fpm/fpm_test.go | 14 -------------- pipeline/snapcraft/snapcraft.go | 6 ++---- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/pipeline/fpm/fpm_test.go b/pipeline/fpm/fpm_test.go index 59cf5bac2..8d1e35654 100644 --- a/pipeline/fpm/fpm_test.go +++ b/pipeline/fpm/fpm_test.go @@ -122,20 +122,6 @@ func TestCreateFileDoesntExist(t *testing.T) { assert.Error(t, Pipe{}.Run(ctx)) } -// TODO: wtf? -func TestRunPipeWithExtraFiles(t *testing.T) { - var ctx = &context.Context{ - Version: "1.0.0", - Parallelism: runtime.NumCPU(), - Config: config.Project{ - FPM: config.FPM{ - Formats: []string{"deb", "rpm"}, - }, - }, - } - assert.NoError(t, Pipe{}.Run(ctx)) -} - func TestDefault(t *testing.T) { var ctx = &context.Context{ Config: config.Project{ diff --git a/pipeline/snapcraft/snapcraft.go b/pipeline/snapcraft/snapcraft.go index f8750bdf9..888cf54f7 100644 --- a/pipeline/snapcraft/snapcraft.go +++ b/pipeline/snapcraft/snapcraft.go @@ -78,8 +78,7 @@ func (Pipe) Run(ctx *context.Context) error { artifact.ByType(artifact.Binary), ), ).GroupByPlatform() { - // TODO: could use artifact.goarch here - arch := linux.Arch(platform) + arch := linux.Arch(platform) // TODO: could use artifact.goarch here binaries := binaries g.Go(func() error { return create(ctx, arch, binaries) @@ -90,8 +89,7 @@ func (Pipe) Run(ctx *context.Context) error { func create(ctx *context.Context, arch string, binaries []artifact.Artifact) error { var log = log.WithField("arch", arch) - // TODO: should add template support here probably... for now, let's use - // archive's template + // TODO: should add template support here probably... for now, let's use archive's template folder, err := nametemplate.Apply(ctx, binaries[0], ctx.Config.ProjectName) if err != nil { return err