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

Error when git repository has no commits #25

Open
grv87 opened this issue Oct 21, 2017 · 4 comments
Open

Error when git repository has no commits #25

grv87 opened this issue Oct 21, 2017 · 4 comments

Comments

@grv87
Copy link
Contributor

grv87 commented Oct 21, 2017

Suppose that you just created directory, run git init and wrote simple build script that uses semantic-release plugin.
Running it could give you an exception:

* What went wrong:
No commit found for revision string: HEAD

Demo build script (don't forget to do git init) and stacktrace:
https://gist.github.com/grv87/1b445bf9daf81bd3f6764ff8c0ef2dde

The problem arises only when some other part of build script tries to use version property. Plugin then throws an error.

Semver FAQ recommends to start development with 0.1.0 version, so it could be used as start.

@tschulte
Copy link
Owner

I think this is related to #24. Internally my plugin uses the gradle-git plugin. I will have a look at this.

Semver FAQ recommends to start with 0.1.0, but it also says, that there are no guarantees about backwards compatibility until version 1.0.0 is reached. Therefore in semantic-release the first version to be released is 1.0.0. Even if that means that version 2.0.0 and 3.0.0 will come soon.

With that said, the first version must always be 1.0.0(-SNAPSHOT)

@grv87
Copy link
Contributor Author

grv87 commented Oct 23, 2017

I agree with you about 1.0.0 for now.
But there is an open discussion about dropping this rule: semver/semver#221

@tschulte
Copy link
Owner

Thank you very much for that link. I didn't know that. I will give a talk at http://javaland.eu about semantic-release (using this plugin, of course). I will incorporate that info.

@grv87
Copy link
Contributor Author

grv87 commented Oct 24, 2017

Also I suspect there is a problem when remote refers to local directory. Although, I haven't tested it yet.

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

2 participants