Beispiel #1
0
        private static void ProcessNumpy()
        {
            var spec = new ReleaseSpec()
            {
                Version             = $"3.7.{V}",
                ProjectName         = ProjectName,
                RelativeProjectPath = ProjectPath,
                PackageId           = "Numpy",
                Description         = @"C# bindings for NumPy - a fundamental library for scientific computing, machine learning and AI. Does not require a local Python installation!",
                PackageTags         = "Data science, Machine Learning, ML, AI, Scientific Computing, NumPy, Linear Algebra, FFT, SVD, Matrix, Python",
                UsePythonIncluded   = true,
            };

            spec.Process();
            // nuget
            var key = File.ReadAllText("../../nuget.key").Trim();

            foreach (var nuget in Directory.GetFiles(Path.Combine(ProjectPath, "bin", "Release"), "*.nupkg"))
            {
                Console.WriteLine("Push " + nuget);
                var arg = $"push -Source https://api.nuget.org/v3/index.json -ApiKey {key} {nuget}";
                var p   = new Process()
                {
                    StartInfo = new ProcessStartInfo("nuget.exe", arg)
                    {
                        RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false
                    }
                };
                p.OutputDataReceived += (x, data) => Console.WriteLine(data.Data);
                p.ErrorDataReceived  += (x, data) => Console.WriteLine("Error: " + data.Data);
                p.Start();
                p.WaitForExit();
                Console.WriteLine("... pushed");
            }
        }
Beispiel #2
0
        private static void ProcessKeras()
        {
            var spec = new ReleaseSpec()
            {
                Version             = $"3.6.{V}",
                ProjectName         = ProjectName,
                RelativeProjectPath = ProjectPath,
                PackageId           = "Keras.NET",
                Description         = @"C# bindings for Keras on {0} - Keras.NET is a high-level neural networks API, capable of running on top of TensorFlow, CNTK, or Theano. ",
                PackageTags         = "Data science, Machine Learning, ML, AI, Keras, Neural Network, deep learning",
                UsePythonIncluded   = true,
            };

            spec.Process();
            // nuget
            var key = File.ReadAllText("../../nuget.key").Trim();

            foreach (var nuget in Directory.GetFiles(Path.Combine(ProjectPath, "bin", "Release"), "*.nupkg"))
            {
                Console.WriteLine("Push " + nuget);
                var arg = $"push -Source https://api.nuget.org/v3/index.json -ApiKey {key} {nuget}";
                var p   = new Process()
                {
                    StartInfo = new ProcessStartInfo("nuget.exe", arg)
                    {
                        RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false
                    }
                };
                p.OutputDataReceived += (x, data) => Console.WriteLine(data.Data);
                p.ErrorDataReceived  += (x, data) => Console.WriteLine("Error: " + data.Data);
                p.Start();
                p.WaitForExit();
                Console.WriteLine("... pushed");
            }
        }