Package org.jreleaser.sdk.git
Class GitSdk
- java.lang.Object
-
- org.jreleaser.sdk.git.GitSdk
-
public class GitSdk extends java.lang.Object- Since:
- 0.1.0
- Author:
- Andres Almiray
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGitSdk.TagComparator
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringREFS_HEADSstatic java.lang.StringREFS_REMOTESstatic java.lang.StringREFS_TAGS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteTag(java.lang.String tagName)static java.lang.StringextractHeadName(org.eclipse.jgit.lib.Ref ref)static java.lang.StringextractRemoteName(org.eclipse.jgit.lib.Ref ref)static java.lang.StringextractTagName(org.eclipse.jgit.lib.Ref tag)booleanfindTag(java.lang.String tagName)java.util.List<java.lang.String>getLocalBranchNames()org.jreleaser.model.releaser.spi.RepositorygetRemote()java.util.List<java.lang.String>getRemoteBranches()org.jreleaser.model.releaser.spi.Commithead()static GitSdkof(java.io.File basedir, boolean gitRootSearch)static GitSdkof(java.nio.file.Path basedir, boolean gitRootSearch)static GitSdkof(org.jreleaser.model.JReleaserContext context)org.eclipse.jgit.api.Gitopen()static java.lang.StringresolveDefaultGitRemoteName()voidtag(java.lang.String tagName, boolean force, org.jreleaser.model.JReleaserContext context)voidtag(java.lang.String tagName, org.jreleaser.model.JReleaserContext context)
-
-
-
Field Detail
-
REFS_TAGS
public static final java.lang.String REFS_TAGS
- See Also:
- Constant Field Values
-
REFS_HEADS
public static final java.lang.String REFS_HEADS
- See Also:
- Constant Field Values
-
REFS_REMOTES
public static final java.lang.String REFS_REMOTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public org.eclipse.jgit.api.Git open() throws java.io.IOException- Throws:
java.io.IOException
-
getRemote
public org.jreleaser.model.releaser.spi.Repository getRemote() throws java.io.IOException- Throws:
java.io.IOException
-
getLocalBranchNames
public java.util.List<java.lang.String> getLocalBranchNames() throws java.io.IOException- Throws:
java.io.IOException
-
getRemoteBranches
public java.util.List<java.lang.String> getRemoteBranches() throws java.io.IOException- Throws:
java.io.IOException
-
head
public org.jreleaser.model.releaser.spi.Commit head() throws java.io.IOException- Throws:
java.io.IOException
-
deleteTag
public void deleteTag(java.lang.String tagName) throws java.io.IOException- Throws:
java.io.IOException
-
findTag
public boolean findTag(java.lang.String tagName) throws java.io.IOException- Throws:
java.io.IOException
-
tag
public void tag(java.lang.String tagName, org.jreleaser.model.JReleaserContext context) throws java.io.IOException- Throws:
java.io.IOException
-
tag
public void tag(java.lang.String tagName, boolean force, org.jreleaser.model.JReleaserContext context) throws java.io.IOException- Throws:
java.io.IOException
-
resolveDefaultGitRemoteName
public static java.lang.String resolveDefaultGitRemoteName()
-
of
public static GitSdk of(org.jreleaser.model.JReleaserContext context)
-
of
public static GitSdk of(java.nio.file.Path basedir, boolean gitRootSearch)
-
of
public static GitSdk of(java.io.File basedir, boolean gitRootSearch)
-
extractTagName
public static java.lang.String extractTagName(org.eclipse.jgit.lib.Ref tag)
-
extractHeadName
public static java.lang.String extractHeadName(org.eclipse.jgit.lib.Ref ref)
-
extractRemoteName
public static java.lang.String extractRemoteName(org.eclipse.jgit.lib.Ref ref)
-
-