Commit 5bef2cc9
5bef2cc95032Merged
zhilyaev <[email protected]> · 5 years ago · 37 files · +5 added · ~25 modified · -7 deleted
Description
WIP: 1000 years later
Details
- Commit
- 5bef2cc95032
- Parent
- 06cafb2ef6d0
pkg/action/build.gomodifiedView file
@@ -12,12 +12,15 @@
1212
plandir string1313
tags cli.StringSlice1414
matchAll bool15+
yml string1516
}1617
1718
func (i *Build) Run() error {18-
//tags := normalizeTags(i.tags)1919
newPlan := plan.New(i.plandir)20-
newPlan.Build()20+
err := newPlan.Build(i.yml, i.normalizeTags(), i.matchAll)21+
if err != nil {22+
return err23+
}2124
2225
oldPlan := plan.New(i.plandir)2326
if oldPlan.IsExist() {@@ -41,27 +44,10 @@
4144
Name: "build",4245
Usage: "Build a plandir",4346
Flags: []cli.Flag{44-
&cli.StringFlag{45-
Name: "plandir",46-
Value: ".helmwave/",47-
Usage: "Path to plandir",48-
EnvVars: []string{"HELMWAVE_PLANDIR"},49-
Destination: &i.plandir,50-
},51-
&cli.StringSliceFlag{52-
Name: "tags",53-
Aliases: []string{"t"},54-
Usage: "It allows you choose releases for sync. Example: -t tag1 -t tag3,tag4",55-
EnvVars: []string{"HELMWAVE_TAGS"},56-
Destination: &i.tags,57-
},58-
&cli.BoolFlag{59-
Name: "match-all-tags",60-
Usage: "Match all provided tags",61-
Value: false,62-
EnvVars: []string{"HELMWAVE_MATCH_ALL_TAGS"},63-
Destination: &i.matchAll,64-
},47+
flagPlandir(&i.plandir),48+
flagTags(&i.tags),49+
flagMatchAllTags(&i.matchAll),50+
flagFile(&i.yml),6551
},6652
Action: toCtx(i.Run),6753
}@@ -69,9 +55,9 @@
6955
7056
// normalizeTags normalizes and splits comma-separated tag list.7157
// ["c", " b ", "a "] -> ["a", "b", "c"].72-
func normalizeTags(tags []string) []string {73-
m := make([]string, len(tags))74-
for i, t := range tags {58+
func (i *Build) normalizeTags() []string {59+
m := make([]string, len(i.tags.Value()))60+
for i, t := range i.tags.Value() {7561
m[i] = strings.TrimSpace(t)7662
}7763
sort.Strings(m)pkg/action/diff.gomodifiedView file
Loading diff…
pkg/action/flags.goaddedView file
Loading diff…
pkg/action/install.gomodifiedView file
Loading diff…
pkg/action/interface.gomodifiedView file
Loading diff…
pkg/action/list.gomodifiedView file
Loading diff…
pkg/action/manifest.gomodifiedView file
Loading diff…
pkg/action/rollback.gomodifiedView file
Loading diff…
pkg/action/status.gomodifiedView file
Loading diff…
pkg/action/uninstall.gomodifiedView file
Loading diff…
pkg/action/validate.gomodifiedView file
Loading diff…
pkg/action/yml.gomodifiedView file
Loading diff…
pkg/action/yml_test.goaddedView file
Loading diff…
pkg/helper/func.gomodifiedView file
Loading diff…
pkg/kubedog/anno.godeleted
Loading diff…
pkg/kubedog/annotations.goaddedView file
Loading diff…
pkg/kubedog/manifest.godeleted
Loading diff…
pkg/kubedog/manifest_test.godeleted
Loading diff…
pkg/kubedog/multitrack.godeleted
Loading diff…
pkg/kubedog/multitrack_test.godeleted
Loading diff…
pkg/plan/apply.gomodifiedView file
Loading diff…
pkg/plan/build.gomodifiedView file
Loading diff…
pkg/plan/destroy.gomodifiedView file
Loading diff…
pkg/plan/export.gomodifiedView file
Loading diff…
pkg/plan/import.gomodifiedView file
Loading diff…
pkg/plan/list.gomodifiedView file
Loading diff…
pkg/plan/new.gomodifiedView file
Loading diff…
pkg/plan/validate.goaddedView file
Loading diff…
pkg/release/config.gomodifiedView file
Loading diff…
pkg/release/dependency.gomodifiedView file
Loading diff…
pkg/release/func.gomodifiedView file
Loading diff…
pkg/release/install.gomodifiedView file
Loading diff…
pkg/release/valuesReference.gomodifiedView file
Loading diff…
pkg/repo/plan.godeleted
Loading diff…
pkg/repo/plan_test.godeleted
Loading diff…
pkg/version/version.gomodifiedView file
Loading diff…
tests/01_helmwave.yml.tpladdedView file
Loading diff…