nemerosa / versioning

Gradle plug-in to generate version information from the SCM branch (Git or Svn)
MIT License
200 stars 40 forks source link

No version information found #52

Closed jschewebbn closed 6 years ago

jschewebbn commented 6 years ago

I added the plugin to my build.gradle file and then executed ./gradlew versionDisplay and got back "[version] No version can be computed from the SCM."

The root of my git repository does match the location of build.gradle, does that cause versioning problems?

dcoraboeuf commented 6 years ago

Hi,

I'm not sure to understand:

The root of my git repository does match the location of build.gradle

Can you please give me a more precise description? See also the gitRepoRootDir option (on the README) for non standard Git structures.

Thanks, Damien

jschewebbn commented 6 years ago

Root of my git repository is "/tmp/project", the build.gradle file is in "/tmp/project/test/code". I added

versioning {
    gitRepoRootDir = '../..'
}

This results in

> Could not set unknown property 'gitRepoRootDir' for object of type net.nemerosa.versioning.VersioningExtension.
dcoraboeuf commented 6 years ago

Which version of the plugin do you use? Latest version is 2.7.1

jschewebbn commented 6 years ago

I took the instructions from the readme " id 'net.nemerosa.versioning' version '2.0.0'"

jschewebbn commented 6 years ago

Changing it to 2.7.1 works.

dcoraboeuf commented 6 years ago

Good that it works.

I've updated the README.