Exemplo n.º 1
0
        private static IList <string> GetSolutions(CliOptions options, Config config)
        {
            if (!Validator.IsNullOrEmpty(options.Solutions))
            {
                return(options.Solutions);
            }

            if (!Validator.IsNullOrEmpty(config?.Solutions))
            {
                return(config?.Solutions);
            }

            return(null);
        }
Exemplo n.º 2
0
        private static void Run(CliOptions options)
        {
            Config config = ConfigParser <Config> .Read("Config.json");

            IOrganizationService sourceOrganizationService = ConnectToSource(options.SourceConnectinString);
            IOrganizationService targetOrganizationService = ConnectToTarget(options.TargetConnectionString) ?? sourceOrganizationService;

            string         targetSolutionName = options.Target ?? config?.SolutionName;
            IList <string> solutions          = GetSolutions(options, config);

            SolutionRepackager solutionRepackager = new SolutionRepackager(sourceOrganizationService, targetOrganizationService);

            solutionRepackager.SetTargetSolution(targetSolutionName);
            solutionRepackager.SetSourceSolutions(solutions);
            solutionRepackager.SetVersion(config?.Version);
            solutionRepackager.StartMerge();
        }