Encapsulate artifacts

This commit is contained in:
flx5 2021-10-01 12:49:08 +02:00
parent 58745db224
commit 7ab84891ae
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
package common
package artifact
import (
"fmt"

View File

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
artifact2 "github.com/xenserver/packer-builder-xenserver/builder/xenserver/common/artifact"
config2 "github.com/xenserver/packer-builder-xenserver/builder/xenserver/common/config"
"github.com/xenserver/packer-builder-xenserver/builder/xenserver/common/xen"
"path"
@ -324,7 +325,7 @@ func (self *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (p
return nil, errors.New("Build was halted.")
}
artifact, _ := xscommon.NewArtifact(self.config.OutputDir)
artifact, _ := artifact2.NewArtifact(self.config.OutputDir)
return artifact, nil
}

View File

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
artifact2 "github.com/xenserver/packer-builder-xenserver/builder/xenserver/common/artifact"
config2 "github.com/xenserver/packer-builder-xenserver/builder/xenserver/common/config"
"github.com/xenserver/packer-builder-xenserver/builder/xenserver/common/xen"
"time"
@ -208,7 +209,7 @@ func (self *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (p
return nil, errors.New("Build was halted.")
}
artifact, _ := xscommon.NewArtifact(self.config.OutputDir)
artifact, _ := artifact2.NewArtifact(self.config.OutputDir)
return artifact, nil
}