gcp-platforms-auto 0.6.3__tar.gz → 0.6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gcp_platforms_auto
3
- Version: 0.6.3
3
+ Version: 0.6.4
4
4
  Summary: A brief description of your package
5
5
  Author-email: ofir4858 <ofirshasha10@gmail.com>
6
6
  License: MIT
@@ -63,7 +63,7 @@ def get_repo(path_of_git_repo, branch="main", path_to_local_repo="/tmp/repo"):
63
63
  raise e
64
64
 
65
65
 
66
- def git_push(repo, commit_message, files_to_push=None):
66
+ def git_push(repo, commit_message, files_to_push=None, branch="main"):
67
67
  try:
68
68
  logger.info(f"Attempting to push changes to Git with commit message: '{commit_message}'")
69
69
  if files_to_push:
@@ -74,13 +74,13 @@ def git_push(repo, commit_message, files_to_push=None):
74
74
  repo.git.add(all=True)
75
75
  logger.info(f"Committing changes with message: '{commit_message}'")
76
76
  repo.index.commit(commit_message)
77
- logger.info("Pushing changes to remote 'origin'")
78
- push_info = repo.remote(name="origin").push()
77
+ logger.info(f"Pushing changes to remote 'origin', branch '{branch}'")
78
+ push_info = repo.remote(name="origin").push(refspec=f"{branch}:{branch}")
79
79
  for info in push_info:
80
- if info.flags >0:
81
- logger.info(f"Git push info: {info.summary}")
82
- if info.flags == 0:
83
- logger.info(f"Git push info: No update {info.summary}")
80
+ if info.flags > 0:
81
+ logger.info(f"Git push info: {info.summary}")
82
+ elif info.flags == 0:
83
+ logger.info(f"Git push info: No update {info.summary}")
84
84
 
85
85
  logger.info("Successfully pushed changes to Git.")
86
86
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gcp_platforms_auto
3
- Version: 0.6.3
3
+ Version: 0.6.4
4
4
  Summary: A brief description of your package
5
5
  Author-email: ofir4858 <ofirshasha10@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gcp_platforms_auto"
7
- version = "0.6.3"
7
+ version = "0.6.4"
8
8
  description = "A brief description of your package"
9
9
  readme = "README.md"
10
10
  authors = [