Skip to content

Commit

Permalink
Only read run path for newer platforms
Browse files Browse the repository at this point in the history
Rename helper

Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Feb 9, 2023
1 parent f04ce7f commit f5dbf38
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions platform/analyze_inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import (
func DefaultAnalyzeInputs(platformAPI *api.Version) LifecycleInputs {
var inputs LifecycleInputs
switch {
case platformAPI.AtLeast("0.9"):
case platformAPI.AtLeast("0.12"):
inputs = defaultAnalyzeInputs()
case platformAPI.AtLeast("0.9"):
inputs = defaultAnalyzeInputs09To011()
case platformAPI.AtLeast("0.7"):
inputs = defaultAnalyzeInputs07()
inputs = defaultAnalyzeInputs07To08()
case platformAPI.AtLeast("0.5"):
inputs = defaultAnalyzeInputs05To06()
default:
Expand All @@ -33,12 +35,12 @@ func defaultAnalyzeInputs() LifecycleInputs {
}

func defaultAnalyzeInputs09To011() LifecycleInputs {
ai := defaultAnalyzeInputs07()
ai := defaultAnalyzeInputs07To08()
ai.LaunchCacheDir = os.Getenv(EnvLaunchCacheDir)
return ai
}

func defaultAnalyzeInputs07() LifecycleInputs {
func defaultAnalyzeInputs07To08() LifecycleInputs {
ai := defaultAnalyzeInputs05To06()
ai.AdditionalTags = str.Slice{}
ai.CacheDir = "" // removed
Expand Down

0 comments on commit f5dbf38

Please sign in to comment.