Пример #1
0
        public RunResult Pack(string nugetExePath, string nuGetSpecPath, string outputDirectory, IEnumerable <Tuple <string, string> > properties)
        {
            _fileManager.EnsureDirectoryExists(new DirectoryInfo(outputDirectory));
            var propertyArgs = new StringBuilder();

            foreach (var property in properties)
            {
                propertyArgs.AppendFormat("{0}={1};", property.Item1, property.Item2);
            }

            var result = GeneralProcessRunner.Run(_fileManager.GetFullPath(nugetExePath), string.Format("pack \"{0}\" -OutputDirectory \"{1}\" -Properties \"{2}\"",
                                                                                                        _fileManager.GetFullPath(nuGetSpecPath), _fileManager.GetFullPath(outputDirectory), propertyArgs));

            return(result);
        }
Пример #2
0
        public RunResult Publish(string nugetExePath, string nuGetPackagePath, string source, string apiKey)
        {
            var result = GeneralProcessRunner.Run(_fileManager.GetFullPath(nugetExePath), string.Format("push \"{0}\" -Source {1} -ApiKey {2}", _fileManager.GetFullPath(nuGetPackagePath), source, apiKey));

            return(result);
        }