Skip to content

Commit

Permalink
NXDRIVE-1227: Tools: Fixed the changelog latest release tag guess
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickaël Schoentgen committed Jun 12, 2018
1 parent aee71d7 commit fd294b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Release date: `2018-06-xx`
- [NXDRIVE-1229](https://jira.nuxeo.com/browse/NXDRIVE-1229): Do not install Drive in %APPDATA% but %LOCALAPPDATA% folder on Windows
- [NXDRIVE-1232](https://jira.nuxeo.com/browse/NXDRIVE-1232): Split the macOS installer build to support macOS 10.11

#### Minor changes
- Tools: Fixed the changelog latest release tag guess


# 3.1.0
Release date: `2018-05-22`
Expand Down
9 changes: 5 additions & 4 deletions tools/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import requests

__version__ = '1.2.5'
__version__ = '1.2.6'


# Available formatters
Expand Down Expand Up @@ -122,12 +122,13 @@ def get_latest_tag():

debug('>>> Retrieving latest created tag')
cmd = 'git rev-list --tags --remove-empty --branches=master --max-count=10'
latest = ''
for sha1 in backtick(cmd.split()).splitlines():
cmd = 'git describe --abbrev=0 --tags ' + sha1
tag = backtick(cmd.split())
if tag.startswith('release-'):
return tag
return ''
if tag.startswith('release-') and tag > latest:
latest = tag
return latest


def get_issues(args):
Expand Down

0 comments on commit fd294b9

Please sign in to comment.