Skip to content

Commit

Permalink
fix git versionifier
Browse files Browse the repository at this point in the history
  • Loading branch information
sirfoga committed Oct 12, 2018
1 parent 02d5406 commit 59ee286
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hal/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__description__ = 'Your swiss knife to perform fast and easy pythonic stuff'
__url__ = 'https://sirfoga.github.io/pyhal/'
__version__ = '10.2.3'
__build__ = '315529bff205fe0f45d4c68ac95ec0457c032f42'
__build__ = '02d54064f5331ad0b90763ea03ae294e2ebae5b4'
__author__ = 'Stefano Fogarollo'
__author_email__ = 'sirfoga@protonmail.com'
__license__ = 'MIT'
Expand Down
4 changes: 3 additions & 1 deletion hal/cvs/gits.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def get_diff(self, commit, other_commit):
:param other_commit: Second commit
:return: dictionary: Dictionary with total additions and deletions
"""
print(other_commit, "VS", commit)
diff = self.repo.git.diff(commit, other_commit)
return Diff(diff).get_totals()

Expand Down Expand Up @@ -157,8 +158,9 @@ def get_new_version(self, last_version, last_commit,

version = Version(last_version)
diff = self.get_diff(last_commit, self.get_last_commit_hash())
total_changed = diff[Diff.ADD] + diff[Diff.DEL]

version.increase_by_changes(diff, diff_to_increase_ratio)
version.increase_by_changes(total_changed, diff_to_increase_ratio)
return version

def get_pretty_version(self, diff_to_increase_ratio):
Expand Down

0 comments on commit 59ee286

Please sign in to comment.