standard-release / app

Language independent GitHub App for creating GitHub Releases, following the Conventional Commits and SemVer specifications
https://github.com/apps/standard-release
Apache License 2.0
13 stars 2 forks source link

Catch if getTags throws and fallback #9

Closed tunnckoCore closed 5 years ago

tunnckoCore commented 6 years ago

If it throws (i believe), we should fallback currentVersion to '0.0.0' probably, so then we won't need to create initial release on every new package/repo

https://github.com/tunnckoCore/semantic-release-app/blob/2481b4d05e23c13ecf5832e0cf2f581981691311/src/index.js#L168-L178

tunnckoCore commented 6 years ago

Any ideas on that @gr2m? One possible way is to get the latest commit and tag it with some version like v0.0.0 or v0.1.0. Note that is only for some totally new repos. What i currently doing is create a repo with initial readme, then i'm going and adding v0.0.0 tag manually, then i just push source code and anything with BREAKING CHANGE: and so i just get v1.0.0 correctly.

One more note is that we should not touch and mess with npm, and actually for totally new modules/repos it won't get our job done anyway.