mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Fixed jGit complaining and not tagging if setAnnotated(false)
This commit is contained in:
parent
0b318520ee
commit
38beb02c2f
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue