List of usage examples for org.eclipse.jgit.api TagCommand setSigned
public TagCommand setSigned(boolean signed)
From source file:org.ajoberstar.gradle.git.tasks.GitTag.java
License:Apache License
/** * Tags the HEAD./*from w ww.j a va 2 s . c o m*/ */ @TaskAction public void tag() { TagCommand cmd = getGit().tag(); cmd.setName(getTagName()); cmd.setMessage(getMessage()); cmd.setSigned(getSign()); cmd.setForceUpdate(getForce()); if (tagger != null) { cmd.setTagger(getTagger()); } try { cmd.call(); } catch (ConcurrentRefUpdateException e) { throw new GradleException("Another process is accessing or updating the ref.", e); } catch (InvalidTagNameException e) { throw new GradleException("Invalid tag name: " + getTagName(), e); } catch (NoHeadException e) { throw new GradleException("Cannot tag without a HEAD revision.", e); } catch (GitAPIException e) { throw new GradleException("Problem with tag.", e); } }