Skip to content

Commit

Permalink
Exit if no new commits.
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jan 8, 2019
1 parent a620a98 commit 14a4f34
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion reporeleaser/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def create_release(self):

description = self.release_description(last_release, new_version)

if description is None:
return

if not self.test:
self.publish(new_version, description, last_commit)
else:
Expand Down Expand Up @@ -169,7 +172,11 @@ def release_description(self, last_release, version):
description += FOOTER
else:
description = BODY
for commit in self.new_commits(last_release['tag_sha']):
commits = self.new_commits(last_release['tag_sha'])
if len(commits) -1 == 0:
print("There is no new commits to release.")
return None
for commit in commits:
if commit.sha == last_release['tag_sha']:
pass
else:
Expand Down

0 comments on commit 14a4f34

Please sign in to comment.