Closed efeg closed 4 years ago
The plugin depends on git to identify the state of the current source-tree and so I don't think there a way around that. While we could just print out some starting version even if there is no git directory, this can lead to unexpected behavior if someone attempts to tag. Having to run git init
doesn't seem too much of a burden imo, since the plugin advertises itself as using git.
@efeg One option might be to automatically create a .git
directory if one doesn't exist (after prompting the user)? What do you think?
Thanks for the response @vivin!
I think it would be great to create a .git
directory automatically if one doesn't exist (after prompting the user). Alternatively, I believe we might make the error message include a guidance on how to resolve the issue -- i.e. Unable to find Git repository. Please run "git init" to generate one.
Only took me a year and a half...
@vivin Thanks for the fix! -- I look forward to pick it up once a release is generated.
gradle-semantic-build-versioning
requires the existence of a git directory. As a result, unless the user explicitly generates a git directory (e.g. viagit init
),gradle build
fails. Is it possible to sidestep the requirement regarding the existence of git folder?Please see the relevant issue here, and the relevant code here.
Thanks!