Exemplo n.º 1
0
        private async Task <bool> DownloadNuget(string nugetUrl, string outputPath)
        {
            _downloadDataFlow = new DownloadDataFlow(_downloader);

            await _downloader.Download(outputPath, new File { ContentHref = nugetUrl, Name = "nuget.exe" });

            _downloadDataFlow.Complete();

            await _downloadDataFlow.Completion;

            return(true);
        }
Exemplo n.º 2
0
            public TestResolveDependencyCommand(ITeamCityClient client, IFileSystem fileSystem, IDownloadDataFlow downloadDataFlow)
                : base(client, fileSystem, downloadDataFlow)
            {
                Client     = client;
                FileSystem = fileSystem;
                Downloader = downloadDataFlow;

                DefaultConfigLocation = @"c:\projects\projectA\dependencies.config";

                FileSystem.GetWorkingDirectory().Returns(@"c:\projects\projectA");
                FileSystem.FileExists(DefaultConfigLocation).Returns(true);
                FileSystem.GetFullPath(@"src\assemblies").Returns(@"c:\projects\projectA\src\assemblies");
            }
Exemplo n.º 3
0
        private async Task FetchArtifactDependencies(string elementPath, EscrowElement element)
        {
            _downloadDataFlow = new DownloadDataFlow(_downloader);
            _builds.Clear();
            var currentDirectory = Directory.GetCurrentDirectory();

            try
            {
                if (!Directory.Exists(elementPath))
                {
                    Directory.CreateDirectory(elementPath);
                }

                Directory.SetCurrentDirectory(elementPath);
                await ResolveDependencies(element.BuildTypeId, element);
            }
            finally
            {
                Directory.SetCurrentDirectory(currentDirectory);
            }
        }
Exemplo n.º 4
0
 public ResolveDependencyCommand(ITeamCityClient client, IFileSystem fileSystem, IDownloadDataFlow downloadDataFlow)
 {
     _fileSystem       = fileSystem;
     _downloadDataFlow = downloadDataFlow;
     _client           = client;
 }