chore: update ui service manager of new service
This commit is contained in:
+16
-12
@@ -26,15 +26,14 @@ def git_push_changes(
|
||||
f"{master_ioc_subs_rel_path}..."
|
||||
f"{iocs_overview_rel_path}..."
|
||||
)
|
||||
repo.index.add(
|
||||
[
|
||||
service_dir_rel_path,
|
||||
registry_file_rel_path,
|
||||
master_hla_names_rel_path,
|
||||
master_ioc_subs_rel_path,
|
||||
iocs_overview_rel_path,
|
||||
]
|
||||
)
|
||||
files_to_stage = [
|
||||
service_dir_rel_path,
|
||||
registry_file_rel_path,
|
||||
master_hla_names_rel_path,
|
||||
master_ioc_subs_rel_path,
|
||||
iocs_overview_rel_path,
|
||||
]
|
||||
repo.index.add(files_to_stage)
|
||||
|
||||
# Check if there are changes to avoid empty commit crashes
|
||||
if not repo.is_dirty(index=True, working_tree=False):
|
||||
@@ -44,9 +43,14 @@ def git_push_changes(
|
||||
logger.info("Committing changes...")
|
||||
repo.index.commit(commit_msg)
|
||||
|
||||
logger.info(f"Pushing branch '{branch_name}' to origin...")
|
||||
origin = repo.remote(name="origin")
|
||||
origin.push(refspec=f"{branch_name}:{branch_name}").raise_if_error()
|
||||
try:
|
||||
logger.info(f"Pushing branch '{branch_name}' to origin...")
|
||||
origin = repo.remote(name="origin")
|
||||
origin.push(refspec=f"{branch_name}:{branch_name}").raise_if_error()
|
||||
except Exception as e:
|
||||
logger.info("Git resetting files")
|
||||
repo.index.reset(files_to_stage)
|
||||
raise e
|
||||
|
||||
logger.info("Successfully pushed!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user