Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Git.tag()


        git = RepoUtil.createRepositoryWithMaster(newDir());
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

        git.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.releaseStart("1.0").call();
    }

    @Test(expected = TagExistsException.class)
View Full Code Here


        InitContext ctx = new InitContext();
        ctx.setVersiontag("vtag/");
       
        JGitFlow flow = initCommand.setInitContext(ctx).setDirectory(git.getRepository().getWorkTree()).call();

        git.tag().setName(flow.getVersionTagPrefix() + "1.0").call();
       
        //just to make sure
        List<Ref> refs = git.tagList().call();
        String name = refs.get(0).getName();
       
View Full Code Here

        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();
        git.push().setRemote("origin").add("develop").call();

        //add the remote tag
        remoteGit.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.releaseStart("1.0").setFetch(true).call();

    }
View Full Code Here

        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();
        git.push().setRemote("origin").add("develop").call();

        //add the remote tag
        remoteGit.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.releaseStart("1.0").call();

        assertEquals(flow.getReleaseBranchPrefix() + "1.0", git.getRepository().getBranch());
View Full Code Here

        git = RepoUtil.createRepositoryWithMaster(newDir());
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

        git.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.hotfixStart("1.0").call();
    }

    @Test(expected = TagExistsException.class)
View Full Code Here

        InitContext ctx = new InitContext();
        ctx.setVersiontag("vtag/");

        JGitFlow flow = initCommand.setInitContext(ctx).setDirectory(git.getRepository().getWorkTree()).call();

        git.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        //just to make sure
        List<Ref> refs = git.tagList().call();
        String name = refs.get(0).getName();
View Full Code Here

        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();
        git.push().setRemote("origin").add("develop").call();

        //add the remote tag
        remoteGit.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.hotfixStart("1.0").setFetch(true).call();

    }
View Full Code Here

        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();
        git.push().setRemote("origin").add("develop").call();

        //add the remote tag
        remoteGit.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.hotfixStart("1.0").call();

        assertEquals(flow.getHotfixBranchPrefix() + "1.0", git.getRepository().getBranch());
View Full Code Here

        {
            git = Git.open( fileSet.getBasedir() );

            // tag the revision
            String tagMessage = scmTagParameters.getMessage();
            Ref tagRef = git.tag().setName( escapedTagName ).setMessage( tagMessage ).setForceUpdate( false ).call();

            if ( repo.isPushChanges() )
            {
                getLogger().info( "push tag [" + escapedTagName + "] to remote..." );
                JGitUtils.push( getLogger(), git, (GitScmProviderRepository) repo, new RefSpec( Constants.R_TAGS
View Full Code Here

   * @return boolean, true if operation was successful, otherwise false
   */
  public static boolean createTag(Repository repository, String objectId, PersonIdent tagger, String tag, String message) {
    try {
      Git gitClient = Git.open(repository.getDirectory());
      TagCommand tagCommand = gitClient.tag();
      tagCommand.setTagger(tagger);
      tagCommand.setMessage(message);
      if (objectId != null) {
        RevObject revObj = getCommit(repository, objectId);
        tagCommand.setObjectId(revObj);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.