File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ def parse_version_info(version_path):
39
39
version_info = {"date" : f'{ datetime .datetime .now ():%Y-%m-%d %H:%M} ' }
40
40
41
41
# Get name of version file
42
- version_name = os .path .basename (version_path )
42
+ file_name = os .path .basename (version_path )
43
+ version_name = os .path .splitext (file_name )[0 ]
43
44
version_info [version_name ] = {
44
45
"CI_PROJECT_NAME" : None ,
45
46
"CI_COMMIT_REF_NAME" : None ,
@@ -102,9 +103,9 @@ def parse_build_name(version_info, git_branch_name=""):
102
103
103
104
# Parse all version info (if found)
104
105
for git_log_filename in os .listdir (settings_path ):
105
- git_log_filepath = os . path . join ( settings_path , git_log_filename )
106
- if os . path . splitext ( git_log_filepath )[ 1 ] == "" :
107
- # No extension, parse version info
106
+ if git_log_filename . endswith ( ".env" ):
107
+ # Metadata file, parse version info
108
+ git_log_filepath = os . path . join ( settings_path , git_log_filename )
108
109
version_info .update (parse_version_info (git_log_filepath ))
109
110
110
111
# Calculate build name from version info
You can’t perform that action at this time.
0 commit comments