Esempio n. 1
0
        private IEnumerable <BuildAction> GetBranchCoreComponentsActions(Folders.ComponentsFolder installerComponentsFolder, DeveloperToolService.GetInstallerContentResponse installerContent)
        {
            var actions = new List <BuildAction>();

            foreach (var coreComponent in installerContent.CoreComponents)
            {
                if (coreComponent.Name == Folders.PackagesFolder.WellKnownName)
                {
                    actions.Add(new BuildAction($"Branch {coreComponent.Name}",
                                                () =>
                    {
                        var targetPath = installerComponentsFolder.Packages.GetServerPath();
                        BranchComponent(coreComponent.ProjectFolder, targetPath, coreComponent.ChangeSet);
                    }));
                }
                else
                {
                    actions.Add(new BuildAction($"Branch core component {coreComponent.Name}",
                                                () =>
                    {
                        var targetPath = installerComponentsFolder.Core.CoreComponent(coreComponent.Name).GetServerPath();
                        BranchComponent(coreComponent.ProjectFolder, targetPath, coreComponent.ChangeSet);
                    }));
                }
            }
            return(actions);
        }
Esempio n. 2
0
        private IEnumerable <BuildAction> GetBranchEnginesAndGamesActions(Folders.ComponentsFolder installerComponentsFolder, DeveloperToolService.GetInstallerContentResponse installerContent)
        {
            var actions = new List <BuildAction>();

            foreach (var gameEngine in installerContent.GameEngines)
            {
                actions.Add(new BuildAction($"Branching game engine {gameEngine.Name}",
                                            () =>
                {
                    var targetPath = installerComponentsFolder.EnginesAndGames.GameEngine(gameEngine.Name).Engine.GetServerPath();
                    BranchComponent(gameEngine.ProjectFolder, targetPath, gameEngine.ChangeSet);
                }));
            }

            foreach (var gameMath in installerContent.GamesMaths)
            {
                actions.Add(new BuildAction($"Branching math for game {gameMath.Name} in engine {gameMath.EngineName}",
                                            () =>
                {
                    var targetPath = installerComponentsFolder.EnginesAndGames.GameEngine(gameMath.EngineName)
                                     .Games
                                     .Game(gameMath.Name)
                                     .Math
                                     .GetServerPath();
                    BranchComponent(gameMath.ProjectFolder, targetPath, gameMath.ChangeSet);
                }));
            }

            foreach (var gameLimits in installerContent.GamesLimits)
            {
                actions.Add(new BuildAction($"Branching limits for game {gameLimits.Name} in engine {gameLimits.EngineName}",
                                            () =>
                {
                    var targetPath = installerComponentsFolder.EnginesAndGames.GameEngine(gameLimits.EngineName)
                                     .Games
                                     .Game(gameLimits.Name)
                                     .Limits
                                     .GetServerPath();
                    BranchComponent(gameLimits.ProjectFolder, targetPath, gameLimits.ChangeSet);
                }));
            }

            return(actions);
        }