Skip to content

Commit

Permalink
Fix: Allow creating releases without having git changes
Browse files Browse the repository at this point in the history
Only try to create a new git commit if there are actual changes like
project version file updates. This allows to create a release even if
there aren't any git changes during the release process.
  • Loading branch information
bjoernricks committed Apr 28, 2023
1 parent 7090d11 commit 98ba594
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 61 deletions.
10 changes: 7 additions & 3 deletions pontos/release/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,13 @@ async def run(

commit_msg = f"Automatic release to {release_version}"

self.git.commit(
commit_msg, verify=False, gpg_signing_key=git_signing_key
)
# check if files have been modified and create a commit
status = list(self.git.status())
if status:
self.git.commit(
commit_msg, verify=False, gpg_signing_key=git_signing_key
)

self.git.tag(
git_version, gpg_key_id=git_signing_key, message=commit_msg
)
Expand Down
Loading

0 comments on commit 98ba594

Please sign in to comment.