Package com.atlassian.jgitflow.core

Examples of com.atlassian.jgitflow.core.JGitFlow.git()


        compareSnapPomFiles(projects);

        assertTrue(flow.git().status().call().isClean());

        flow.git().checkout().setName(flow.getDevelopBranchName()).call();

        compareDevPomFiles(projects);
       
        return new SessionAndProjects(session,projects);
       
View Full Code Here


    {
        List<MavenProject> projects = createReactorProjects("rewrite-for-hotfix",projectName);
        File projectRoot = ctx.getBaseDir();

        JGitFlow flow = JGitFlow.getOrInit(projectRoot);
        flow.git().checkout().setName(flow.getMasterBranchName()).call();
        assertOnMaster(flow);

        initialCommitAll(flow);
        FlowReleaseManager relman = getHotfixManager();
View Full Code Here

        assertOnHotfix(flow);

        compareSnapPomFiles(projects);

        assertTrue(flow.git().status().call().isClean());
    }

    protected void initialCommitAll(JGitFlow flow) throws Exception
    {
        commitAll(flow, "Initial commit");
View Full Code Here

            String featureVersion = NamingUtil.camelCaseOrSpaceToDashed(unprefixedBranchName);
            featureVersion = StringUtils.replace(featureVersion, "-", "_");

            pomUpdater.addFeatureVersionToSnapshotVersions(ProjectCacheKey.FEATURE_START_LABEL, featureVersion, branchProjects);

            projectHelper.commitAllPoms(flow.git(), branchProjects, ctx.getScmCommentPrefix() + "updating poms for " + featureVersion + " version" + ctx.getScmCommentSuffix());
           
        }
        catch (Exception e)
        {
            throw new JGitFlowExtensionException("Error updating poms with feature versions for branch '" + unprefixedBranchName + "'");
View Full Code Here

            //reload the reactor projects for release
            List<MavenProject> branchProjects = branchHelper.getProjectsForCurrentBranch();

            pomUpdater.removeSnapshotFromPomVersions(cacheKey, versionSuffix, branchProjects);

            projectHelper.commitAllPoms(flow.git(), branchProjects, ctx.getScmCommentPrefix() + "updating poms for branch'" + fullBranchName + "' with non-snapshot versions" + ctx.getScmCommentSuffix());
        }
        catch (Exception e)
        {
            throw new JGitFlowExtensionException("Error updating poms with non-snapshot versions for branch '" + branchType.name() + "'");
        }
View Full Code Here

            List<MavenProject> developProjects = checkoutAndGetProjects.run(flow.getDevelopBranchName()).getProjects();

            pomUpdater.copyPomVersionsFromMap(versionCacheProvider.getCachedVersions(),developProjects);
            projectHelper.commitAllPoms(git,developProjects,ctx.getScmCommentPrefix() + "Updating develop poms back to pre merge state" + ctx.getScmCommentSuffix());
           
            flow.git().checkout().setName(originalBranchName).call();
        }
        catch (Exception e)
        {
            throw new JGitFlowExtensionException("Error updating develop poms to previously cached versions", e);
        }
View Full Code Here

            String developLabel = labelProvider.getNextVersionLabel(VersionType.DEVELOPMENT, ProjectCacheKey.DEVELOP_BRANCH, developProjects);

            pomUpdater.updatePomsWithNextDevelopmentVersion(ProjectCacheKey.DEVELOP_BRANCH, developProjects);

            projectHelper.commitAllPoms(flow.git(), developProjects, ctx.getScmCommentPrefix() + "updating poms for " + developLabel + " development" + ctx.getScmCommentSuffix());
           
            flow.git().checkout().setName(originalBranchName).call();
           
        }
        catch (Exception e)
View Full Code Here

            pomUpdater.updatePomsWithNextDevelopmentVersion(ProjectCacheKey.DEVELOP_BRANCH, developProjects);

            projectHelper.commitAllPoms(flow.git(), developProjects, ctx.getScmCommentPrefix() + "updating poms for " + developLabel + " development" + ctx.getScmCommentSuffix());
           
            flow.git().checkout().setName(originalBranchName).call();
           
        }
        catch (Exception e)
        {
            throw new JGitFlowExtensionException("Error updating develop poms to next development version", e);
View Full Code Here

            //reload the reactor projects for release
            List<MavenProject> branchProjects = branchHelper.getProjectsForCurrentBranch();

            pomUpdater.addSnapshotToPomVersions(cacheKey, versionType, versionSuffix, branchProjects);

            projectHelper.commitAllPoms(flow.git(), branchProjects, ctx.getScmCommentPrefix() + "updating poms for branch '" + unprefixedBranchName + "' with snapshot versions" + ctx.getScmCommentSuffix());
        }
        catch (Exception e)
        {
            throw new JGitFlowExtensionException("Error updating poms with snapshot versions for branch '" + unprefixedBranchName + "' : " + e.getMessage(),e);
        }
View Full Code Here

                    throw new MavenJGitFlowException("Error building: " + e.getMessage(), e);
                }
            }

            //revert our local changes
            flow.git().reset().setMode(ResetCommand.ResetType.HARD).call();

        }
        catch (JGitFlowException e)
        {
            throw new MavenJGitFlowException("Error finish feature: " + e.getMessage(), e);
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.