|
|
@ -1,5 +1,6 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
using Mono.Options;
|
|
|
|
using Mono.Options;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
|
@ -12,12 +13,13 @@ namespace nuget_cli
|
|
|
|
private static bool shouldShowPushHelp;
|
|
|
|
private static bool shouldShowPushHelp;
|
|
|
|
private static string apiKey = null;
|
|
|
|
private static string apiKey = null;
|
|
|
|
private static string source = null;
|
|
|
|
private static string source = null;
|
|
|
|
|
|
|
|
private static int pushKO = 0;
|
|
|
|
|
|
|
|
|
|
|
|
static Program()
|
|
|
|
static Program()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
static int Main(string[] args)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var options = new OptionSet {
|
|
|
|
var options = new OptionSet {
|
|
|
@ -85,6 +87,7 @@ namespace nuget_cli
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<PushReport> reports = await PushPkgAsync(pargs);
|
|
|
|
List<PushReport> reports = await PushPkgAsync(pargs);
|
|
|
|
Console.WriteLine(JsonConvert.SerializeObject(reports));
|
|
|
|
Console.WriteLine(JsonConvert.SerializeObject(reports));
|
|
|
|
|
|
|
|
pushKO = reports.Count( r => !r.OK );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
commandSet.Add(push);
|
|
|
|
commandSet.Add(push);
|
|
|
@ -107,7 +110,7 @@ namespace nuget_cli
|
|
|
|
Console.Write("nuget-cli: ");
|
|
|
|
Console.Write("nuget-cli: ");
|
|
|
|
Console.WriteLine(e.Message);
|
|
|
|
Console.WriteLine(e.Message);
|
|
|
|
Console.WriteLine("Try `nuget-cli --help' for more information.");
|
|
|
|
Console.WriteLine("Try `nuget-cli --help' for more information.");
|
|
|
|
return;
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -116,11 +119,14 @@ namespace nuget_cli
|
|
|
|
// output the options
|
|
|
|
// output the options
|
|
|
|
Console.WriteLine("Options:");
|
|
|
|
Console.WriteLine("Options:");
|
|
|
|
options.WriteOptionDescriptions(Console.Out);
|
|
|
|
options.WriteOptionDescriptions(Console.Out);
|
|
|
|
return;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int runCode = commandSet.Run(args);
|
|
|
|
|
|
|
|
if (runCode == 0 ) if (pushKO>0) return 3;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return runCode;
|
|
|
|
|
|
|
|
|
|
|
|
commandSet.Run(args);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|