@@ -22,7 +22,7 @@ type Asset struct {
2222type Dependencies struct {
2323 rootFs billy.Filesystem
2424 assetsVersionsMap map [string ][]Asset
25- vr * VersionRules
25+ VR * VersionRules
2626 // These wrappers are used to mock the filesystem and git status in the tests
2727 walkDirWrapper WalkDirFunc
2828 makeRemoveWrapper MakeRemoveFunc
@@ -58,7 +58,7 @@ func cycleLog(debugMode bool, msg string, data interface{}) {
5858// InitDependencies will check the filesystem, branch version,
5959// git status, initialize the Dependencies struct and populate it.
6060// If anything fails the operation will be aborted.
61- func InitDependencies (repoRoot , branchVersion string , currentChart string , debug bool ) (* Dependencies , error ) {
61+ func InitDependencies (rootFs billy. Filesystem , branchVersion string , currentChart string , debug bool ) (* Dependencies , error ) {
6262 logrus .SetFormatter (& logrus.TextFormatter {
6363 DisableQuote : true ,
6464 })
@@ -82,13 +82,13 @@ func InitDependencies(repoRoot, branchVersion string, currentChart string, debug
8282
8383 cycleLog (debug , "Getting branch version rules for: " , branchVersion )
8484 // Initialize and check version rules for the current branch
85- dep .vr , err = GetVersionRules (branchVersion , debug )
85+ dep .VR , err = GetVersionRules (branchVersion , debug )
8686 if err != nil {
8787 return nil , fmt .Errorf ("encountered error while getting current branch version: %s" , err )
8888 }
8989
9090 // Get the filesystem and index.yaml path for the repository
91- dep .rootFs = filesystem . GetFilesystem ( repoRoot )
91+ dep .rootFs = rootFs
9292
9393 // Check if the assets folder and Helm index file exists in the repository
9494 exists , err := filesystem .PathExists (dep .rootFs , path .RepositoryAssetsDir )
@@ -172,7 +172,7 @@ func (ld *Dependencies) removeAssetsVersions(debug bool) (map[string][]Asset, er
172172
173173 // Loop through the versions of the asset and remove the ones that are not in the lifecycle
174174 for _ , asset := range assetsVersionsMap {
175- isVersionInLifecycle := ld .vr . checkChartVersionForLifecycle (asset .version )
175+ isVersionInLifecycle := ld .VR . CheckChartVersionForLifecycle (asset .version )
176176 if isVersionInLifecycle {
177177 logrus .Debugf ("Version %s is in lifecycle for %s" , asset .version , chartName )
178178 continue // Skipping version in lifecycle
0 commit comments