Examples of BranchType


Examples of com.atlassian.jgitflow.core.BranchType

    {
        ProjectCacheKey cacheKey = null;
        VersionType versionType = null;
        String versionSuffix = "";

        BranchType branchType = BranchType.UNKNOWN;

        try
        {
            branchType = branchHelper.getCurrentBranchType();

            ReleaseContext ctx = contextProvider.getContext();
            JGitFlow flow = jGitFlowProvider.gitFlow();

            switch (branchType)
            {
                case RELEASE:
                    cacheKey = ProjectCacheKey.RELEASE_FINISH_LABEL;
                    versionSuffix = ctx.getReleaseBranchVersionSuffix();
                    break;

                case HOTFIX:
                    cacheKey = ProjectCacheKey.HOTFIX_LABEL;
                    versionSuffix = "";
                    break;

                default:
                    throw new JGitFlowExtensionException("Unsupported branch type '" + branchType.name() + "' while running " + this.getClass().getSimpleName() + " command");
            }

            checkNotNull(cacheKey);
            String fullBranchName = branchHelper.getCurrentBranchName();

            getLogger().info("(" + fullBranchName + ") Updating poms for " + branchType.name());

            //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

Examples of com.atlassian.jgitflow.core.BranchType

        String versionSuffix = "";
        String unprefixedBranchName = "";

        try
        {
            BranchType branchType = branchHelper.getCurrentBranchType();

            ReleaseContext ctx = contextProvider.getContext();
            JGitFlow flow = jGitFlowProvider.gitFlow();

            switch (branchType)
            {
                case RELEASE:
                    cacheKey = ProjectCacheKey.RELEASE_START_LABEL;
                    versionType = VersionType.RELEASE;
                    versionSuffix = ctx.getReleaseBranchVersionSuffix();
                    break;

                case HOTFIX:
                    cacheKey = ProjectCacheKey.HOTFIX_LABEL;
                    versionType = VersionType.HOTFIX;
                    versionSuffix = "";
                    break;
               
                default:
                    throw new JGitFlowExtensionException("Unsupported branch type '" + branchType.name() + "' while running " + this.getClass().getSimpleName() + " command");
            }

            checkNotNull(cacheKey);
            checkNotNull(versionType);
View Full Code Here

Examples of com.atlassian.jgitflow.core.BranchType

    @Override
    public void execute(GitFlowConfiguration configuration, Git git, JGitFlowCommand gitFlowCommand, JGitFlowReporter reporter) throws JGitFlowExtensionException
    {
        try
        {
            BranchType branchType = branchHelper.getCurrentBranchType();
            ProjectCacheKey cacheKey = null;
           
            switch (branchType)
            {
                case RELEASE:
                    cacheKey = ProjectCacheKey.RELEASE_BRANCH;
                    break;

                case HOTFIX:
                    cacheKey = ProjectCacheKey.HOTFIX_BRANCH;
                    break;
               
                case DEVELOP:
                    cacheKey = ProjectCacheKey.DEVELOP_BRANCH;
                    break;
               
                case MASTER:
                    cacheKey = ProjectCacheKey.MASTER_BRANCH;
                    break;

                case FEATURE:
                    cacheKey = ProjectCacheKey.FEATURE_BRANCH;
                    break;

                default:
                    throw new JGitFlowExtensionException("Unsupported branch type '" + branchType.name() + "' while running " + this.getClass().getSimpleName() + " command");
            }
           
            ReleaseContext ctx = contextProvider.getContext();
            List<MavenProject> branchProjects = branchHelper.getProjectsForCurrentBranch();

            projectHelper.checkPomForVersionState(VersionState.RELEASE, branchProjects);

            if (!ctx.isAllowSnapshots())
            {
                List<String> snapshots = projectHelper.checkForNonReactorSnapshots(cacheKey, branchProjects);
                if (!snapshots.isEmpty())
                {
                    String details = Joiner.on(ls).join(snapshots);
                    throw new UnresolvedSnapshotsException("Cannot finish a " + branchType.name().toLowerCase() + " due to snapshot dependencies:" + ls + details);
                }
            }
        }
        catch (Exception e)
        {
View Full Code Here

Examples of com.atlassian.jgitflow.core.BranchType

        }

        StartProductionBranchExtension startExtension = (StartProductionBranchExtension) extension;
        try
        {
            BranchType type = branchHelper.getCurrentBranchType();

            switch(type)
            {
                case HOTFIX:
                    startExtension.onTopicBranchVersionChange(newVersion,oldVersion,flow);
View Full Code Here

Examples of com.atlassian.jgitflow.core.BranchType

        }

        MavenReleaseStartExtension startExtension = (MavenReleaseStartExtension) extension;
        try
        {
            BranchType type = branchHelper.getCurrentBranchType();

            switch (type)
            {
                case DEVELOP:
                    startExtension.onDevelopBranchVersionChange(newVersion, oldVersion, flow);
View Full Code Here

Examples of com.atlassian.jgitflow.core.BranchType

        }
       
        FinishProductionBranchExtension finishExtension = (FinishProductionBranchExtension) extension;
        try
        {
            BranchType type = branchHelper.getCurrentBranchType();
           
            switch(type)
            {
                case MASTER:
                    finishExtension.onMasterBranchVersionChange(newVersion,oldVersion,flow);
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.