grim/convey
Clone
Summary
Browse
Changes
Graph
Add the convey version to the environment
redux
2021-10-11, Gary Kramlich
82d28cf8e74d
Add the convey version to the environment
package
docker
import
(
"fmt"
log
"github.com/sirupsen/logrus"
"keep.imfreedom.org/grim/convey/environment"
"keep.imfreedom.org/grim/convey/runtime"
"keep.imfreedom.org/grim/convey/tasks"
"keep.imfreedom.org/grim/convey/yaml"
)
type
Export
struct
{
Files
yaml
.
StringOrSlice
`yaml:"files"`
realExport
*
tasks
.
Export
}
// New creates a new Export task.
func
(
e
*
Export
)
New
()
tasks
.
Task
{
return
&
Export
{}
}
// Valid validates the export task.
func
(
e
*
Export
)
Valid
()
error
{
e
.
realExport
=
&
tasks
.
Export
{
Files
:
e
.
Files
,
}
return
e
.
realExport
.
Valid
()
}
// Executes the task
func
(
e
*
Export
)
Execute
(
name
string
,
logger
*
log
.
Entry
,
env
environment
.
Environment
,
rt
*
runtime
.
Runtime
)
error
{
return
e
.
realExport
.
Execute
(
name
,
logger
,
env
,
rt
)
}
func
(
e
*
Export
)
Deprecated
()
error
{
return
fmt
.
Errorf
(
"docker/export has been deprecated in favor of convey/export since 0.15.0"
)
}