File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 2222latest_version = '1.0.0'
2323
2424
25- def get_mapping ():
25+ def get_mapping (version ):
2626 # NOTE(eli): It's required not to have circular dependencies error
2727 from gemini_solution_builder .actions import build
2828 from gemini_solution_builder import validators
2929
30- return [
31- {'version' : '1.0.0' ,
32- 'templates' : ['templates/base' , 'templates/v1/' ],
33- 'validator' : validators .ValidatorV1 ,
34- 'builder' : build .BuildSolutionV1 },
35- ]
30+ return {'version' : version ,
31+ 'templates' : ['templates/base' , 'templates/v1/' ],
32+ 'validator' : validators .ValidatorV1 ,
33+ 'builder' : build .BuildSolutionV1 }
3634
3735
3836def get_solution_for_version (version ):
@@ -45,13 +43,13 @@ def get_solution_for_version(version):
4543 'validator' - validator class
4644 'builder' - builder class
4745 """
48- data = filter ( lambda p : p [ 'version' ] == version , get_mapping () )
46+ data = get_mapping (version )
4947
5048 if not data :
5149 raise errors .WrongPackageVersionError (
5250 'Wrong package version "{0}"' .format (version ))
5351
54- return data [ 0 ]
52+ return data
5553
5654
5755def get_version_mapping_from_solution (solution_path ):
You can’t perform that action at this time.
0 commit comments