Exemple #1
0
        public void DownloadFolderContent(IServerPath serverPath, ILocalPath localPath, ILogger logger)
        {
            var items = this.VersionControlServer.GetItems(serverPath.AsString(), VersionSpec.Latest, RecursionType.OneLevel);

            foreach (var item in items.Items)
            {
                if (0 == string.Compare(item.ServerItem, serverPath.AsString(), true))
                {
                    continue;
                }

                var itemServerPath = new ServerPath(item.ServerItem);
                var itemLocalPath  = localPath.Subpath(itemServerPath.GetName());

                if (item.ItemType == ItemType.File)
                {
                    logger.Info($"Download file {item.ServerItem} to {itemLocalPath.AsString()}");
                    item.DownloadFile(itemLocalPath.AsString());
                }
                else
                {
                    DownloadFolderContent(itemServerPath, itemLocalPath, logger);
                }
            }
        }
Exemple #2
0
        public void Execute(IInstallerBuildContext context)
        {
            var path = _toFolder.Subpath(Constants.LatestTxt);

            context.Logger.Info($"Writting content for {path.AsString()}");
            context.FileSystemAdapter.WriteTextFileContent(path, _content);
        }
Exemple #3
0
 public void Execute(IInstallerBuildContext context)
 {
     context.Logger.Info($"Start download component from {_component.DistributionFolder.AsString()}");
     context.SourceControlAdapter.DownloadFolderContent(_component.DistributionFolder,
                                                        _toFolder.Subpath(_component.ComponentID),
                                                        context.Logger);
 }
Exemple #4
0
 public ILocalPath ResolveDistributionLocalPath(ILocalPath basePath)
 {
     return(basePath.Subpath(Folders.EnginesAndGamesFolder.WellKnownName)
            .Subpath(_contentProvider.Name)
            .Subpath(Folders.EngineFolder.WellKnownName)
            .Subpath(_version.ToString()));
 }
Exemple #5
0
 public ILocalPath ResolveDistributionLocalPath(ILocalPath basePath)
 {
     return(basePath.Subpath(Folders.EnginesAndGamesFolder.WellKnownName)
            .Subpath(_engineName.ToString())
            .Subpath(Folders.GamesFolder.WellKnownName)
            .Subpath(_gameName)
            .Subpath(Folders.GameLimitsFolder.WellKnownName)
            .Subpath(_version.ToString()));
 }
Exemple #6
0
 public ILocalPath ResolveDistributionPath(ILocalPath basePath)
 {
     return(basePath.Subpath(this.FileName));
 }
Exemple #7
0
 public ILocalPath ResolveBuildOutputPath(ILocalPath basePath)
 {
     return(basePath.Subpath(Folders.GamesFolder.WellKnownName)
            .Subpath(GameName)
            .Subpath(FileName));
 }
Exemple #8
0
 public ILocalPath ResolveDistributionPath(ILocalPath basePath)
 {
     return(basePath.Subpath(this.FileDefinition.DistributionRelativePath));
 }
Exemple #9
0
 public virtual ILocalPath ResolveBuildOutputPath(ILocalPath basePath)
 {
     return(basePath.Subpath(FileDefinition.BuildOutputRelativePath));
 }
Exemple #10
0
 public IServerPath Subpath(string name)
 {
     return(new MockServerPath(_localPath.Subpath(name).AsString()));
 }