1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Fixed jGit complaining and not tagging if setAnnotated(false)

This commit is contained in:
Erik C. Thauvin 2017-03-20 18:33:07 -07:00
parent 0b318520ee
commit 38beb02c2f

View file

@ -31,7 +31,12 @@ class Git @Inject constructor() {
.findGitDir() .findGitDir()
.build() .build()
val git = org.eclipse.jgit.api.Git(repo) val git = org.eclipse.jgit.api.Git(repo)
val ref = git.tag().setAnnotated(annotated).setName(version).setMessage(message).call() // jGit library will complain and not tag if setAnnotated(false)
var ref = if (annotated) {
git.tag().setAnnotated(annotated).setName(version).setMessage(message).call()
} else {
git.tag().setName(version).setMessage(message).call()
}
git.push().setPushTags().call() git.push().setPushTags().call()
true true
} catch(ex: Exception) { } catch(ex: Exception) {