Open Szer opened 3 years ago
git tag 0.0.1
printVersion
0.0.2
Cannot read field "w1" because "src" is null
It happens because this tag couldn't be "peeled" to commit behind it, so code here https://github.com/karmann-dm/gradle-versions-plugin/blob/ba3c8812f4f9dae1dfb5d328e2d851e2e8e875ac/src/main/java/com/karmanno/plugins/services/PrepareVersionService.java#L28
returns null on .getPeeledObjectId() which later causes failure inside jgit library
null
.getPeeledObjectId()
jgit
Don't tag manually? But that could be difficult in monorepos or some weird setups.
Fixed here https://github.com/karmann-dm/gradle-versions-plugin/releases/tag/2.0.0 Now if tag is not recognized as a canonical one will be simply ignored
Repro
git tag 0.0.1
printVersion
Expected
0.0.2
Actual
Cannot read field "w1" because "src" is null
More info
It happens because this tag couldn't be "peeled" to commit behind it, so code here https://github.com/karmann-dm/gradle-versions-plugin/blob/ba3c8812f4f9dae1dfb5d328e2d851e2e8e875ac/src/main/java/com/karmanno/plugins/services/PrepareVersionService.java#L28
returns
null
on.getPeeledObjectId()
which later causes failure insidejgit
libraryWorkaround
Don't tag manually? But that could be difficult in monorepos or some weird setups.