File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 33import argparse
44import logging
55from pathlib import Path
6- from typing import Set
6+ from typing import List
77
88DEFAULT_VERSION = "1.0.0"
99
@@ -15,13 +15,12 @@ logging.basicConfig(
1515)
1616
1717
18- def main (properties_file : Path , projects : Set [str ]):
18+ def main (properties_file : Path , projects : List [str ]):
1919 if not properties_file .is_file ():
2020 raise ValueError (f"Properties file { properties_file } does not exist" )
2121
2222 properties = read_properties (properties_file )
23-
24- for project in sorted (projects ):
23+ for project in projects :
2524 project_key = f"model.{ project } .version"
2625 if project_key not in properties :
2726 logger .info (
@@ -41,7 +40,8 @@ def main(properties_file: Path, projects: Set[str]):
4140
4241 # Write the file containing the list of changed services, excluding the 'all' project
4342 changed_file = properties_file .parent / '.changed'
44- projects .discard ('all' )
43+ if 'all' in projects :
44+ projects .remove ('all' )
4545 changed_file .write_text ("\n " .join (projects ))
4646
4747
@@ -89,4 +89,4 @@ if __name__ == "__main__":
8989
9090 args = parser .parse_args ()
9191
92- main (args .properties , set (args .services ))
92+ main (args .properties , sorted ( set (args .services ) ))
You can’t perform that action at this time.
0 commit comments