Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest tag is incorrect #114

Closed
el-davo opened this issue Sep 22, 2016 · 3 comments
Closed

Latest tag is incorrect #114

el-davo opened this issue Sep 22, 2016 · 3 comments

Comments

@el-davo
Copy link

el-davo commented Sep 22, 2016

Hi

Ive been using the example you have for getting the latest tag

require('simple-git')(__dirname + '/some-repo')
         .pull()
         .tags(function(err, tags) {
            console.log("Latest available tag: %s", tags.latest);
         });

However when i bump the major version it incorrectly reports that the previous version is the latest when i run the function again.

here is the output from the tags

TagList {
  latest: 'v0.6.2',
  all:
   [ 'v1.0.0',
     'v0.0.1',
     'v0.0.2',
     'v0.0.3',
     'v0.0.4',
     'v0.0.5',
     'v0.0.6',
     'v0.0.7',
     'v0.1.0',
     'v0.2.0',
     'v0.3.0',
     'v0.4.0',
     'v0.5.0',
     'v0.6.0',
     'v0.6.1',
     'v0.6.2' ] }

Am not sure if this is meant to happen. But to me the latest here would be version v1.0.0 and not v0.6.2

Any help appreciated

@steveukx
Copy link
Owner

Hi, parsing the tag version numbers wasn't taking account of the v prefix. A new version 1.51.0 is on npm now that will take care of that for you.

@el-davo
Copy link
Author

el-davo commented Sep 24, 2016

Awesome, thanks!

@glin7976
Copy link

Hi, is this fixed? I'm still facing the incorrect latest tag issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants