55from shutil import rmtree , copytree
66
77
8+ class color :
9+ """Simple colors for print without external libraries."""
10+ PURPLE = '\033 [95m'
11+ CYAN = '\033 [96m'
12+ DARK_CYAN = '\033 [36m'
13+ BLUE = '\033 [94m'
14+ GREEN = '\033 [92m'
15+ YELLOW = '\033 [93m'
16+ RED = '\033 [91m'
17+ BOLD = '\033 [1m'
18+ UNDERLINE = '\033 [4m'
19+ END = '\033 [0m'
20+
21+
822def change_line_endings_crlf_to_lf ():
923 for path in Path ("." ).glob ("**/*" ):
1024 if path .is_file ():
@@ -31,20 +45,27 @@ def add_ci_action_unit_tests_runner():
3145
3246 target_language = "{{cookiecutter.project_language}}"
3347
34- if {{cookiecutter .add_ci_action_unit_tests_runner }} and target_language .lower () != "other" :
48+ if {{cookiecutter .add_ci_action_unit_tests_runner }}:
49+
50+ if target_language .lower () != "other" :
51+
52+ LOG .info ("Adding action for running unit tests (workflows folder) with default config..." )
3553
36- LOG .info ("Adding action for running unit tests (workflows folder) with default config..." )
54+ destination = Path ("workflows" )
55+ ci_test_workflow_files_path = Path ("_" , "workflows" , target_language )
56+ copytree (ci_test_workflow_files_path , destination )
3757
38- destination = Path ("workflows" )
39- ci_test_workflow_files_path = Path ("_" , "workflows" , target_language )
40- copytree (ci_test_workflow_files_path , destination )
58+ print ("\n \n ######################################################################" )
59+ print ("# #" )
60+ print (f"# { color .BOLD } { color .BLUE } Please review gen. checklist in order to adjust CI UT basic action{ color .END } #" )
61+ print ("# #" )
62+ print ("######################################################################\n \n " )
4163
42- print ("\n \n #################################################################" )
43- print ("# Please check gen. checklist in order to adjust CI UT basic action #" )
44- print ("#################################################################\n \n " )
64+ else :
65+ LOG .info ("CI action for running unit tests file generation is not defined for %s language. Skipping..." , target_language )
4566
4667 else :
47- LOG .info ("Skipping CI action for running unit tests file generation (%s language selected) ..." , target_language )
68+ LOG .info ("Skipping CI action for running unit tests file generation" )
4869
4970
5071def clean ():
0 commit comments