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

Merge pull request #347 from ethauvin/master

Fixed jGit complaining and not tagging if setAnnotated(false)
This commit is contained in:
Cedric Beust 2017-03-20 18:44:59 -07:00 committed by GitHub
commit bdb8f5988d

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) {