grim/convey

2646ef22600e
Parents df51173201f2
Children 3005ba6231b7
Update convey/clean to use yaml.StringOrSlice. Fixes #148
--- a/ChangeLog Sun Jan 07 03:07:02 2018 -0600
+++ b/ChangeLog Sun Jan 07 03:13:10 2018 -0600
@@ -1,6 +1,7 @@
0.12.0:
* Deprecated engine attribute, and changed type attribute to be {engine}/{type}. Warnings will be output if legacy formats are detected. Fixed # 143
* Unknown command line arguments are now fatal. Fixed #149
+ * convey/clean can now take a single string for it's files attribute. Fixed #148
0.11.2: 20171227
* Changed TaskTimeout to PlanTimeout. Fixed # 134
--- a/intrinsic/clean.go Sun Jan 07 03:07:02 2018 -0600
+++ b/intrinsic/clean.go Sun Jan 07 03:13:10 2018 -0600
@@ -29,10 +29,11 @@
"bitbucket.org/rw_grim/convey/environment"
"bitbucket.org/rw_grim/convey/state"
"bitbucket.org/rw_grim/convey/tasks"
+ "bitbucket.org/rw_grim/convey/yaml"
)
type Clean struct {
- Files []string `yaml:"files"`
+ Files yaml.StringOrSlice `yaml:"files"`
}
func sanitizeFile(base, file string, env []string) (string, error) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/convey-clean-task.yml Sun Jan 07 03:13:10 2018 -0600
@@ -0,0 +1,17 @@
+# This test just verifies that the convely/clean task can take a single file or
+# a list of files.
+tasks:
+ clean-file:
+ type: convey/clean
+ files: i-do-not-exist
+ clean-files:
+ type: convey/clean
+ files:
+ - i-do-not-exist
+ - neither-do-i
+plans:
+ default:
+ stages:
+ - tasks:
+ - clean-file
+ - clean-files