Skip to content

Commit

Permalink
Merge pull request #699 from conda-forge/beckermr-patch-1
Browse files Browse the repository at this point in the history
fix: do not commit if there is an error
  • Loading branch information
beckermr authored Oct 1, 2024
2 parents 4550d3a + 4cc2c5e commit d7cfa9e
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions conda_forge_webservices/github_actions_integration/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,28 +230,31 @@ def main_finalize_task(task_data_dir):
repo,
)

sync_dirs(
source_feedstock_dir,
feedstock_dir,
ignore_dot_git=True,
update_git=True,
)
subprocess.run(
["git", "add", "."],
cwd=feedstock_dir,
check=True,
)
subprocess.run(
[
"git",
"commit",
"-m",
task_results["commit_message"],
"--allow-empty",
],
cwd=feedstock_dir,
check=True,
)
if not task_results["rerender_error"]:
sync_dirs(
source_feedstock_dir,
feedstock_dir,
ignore_dot_git=True,
update_git=True,
)
subprocess.run(
["git", "add", "."],
cwd=feedstock_dir,
check=True,
)

if task_results["commit_message"]:
subprocess.run(
[
"git",
"commit",
"-m",
task_results["commit_message"],
"--allow-empty",
],
cwd=feedstock_dir,
check=True,
)

# now do any comments and/or pushes
if task == "rerender":
Expand Down

0 comments on commit d7cfa9e

Please sign in to comment.