|
|
|
@ -24,6 +24,7 @@ namespace isn
|
|
|
|
|
{ "s|source=", "use source", val => currentSource = currentSource ?? val },
|
|
|
|
|
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private static readonly string _configFileName =
|
|
|
|
|
Path.Combine(
|
|
|
|
|
Path.Combine(Environment.GetFolderPath(
|
|
|
|
@ -34,6 +35,7 @@ namespace isn
|
|
|
|
|
public const string push = "push";
|
|
|
|
|
static readonly OptionSet options = new OptionSet {
|
|
|
|
|
{ "h|help", "show this message and exit", h => shouldShowHelp = h != null },
|
|
|
|
|
{ "v|version", "show soft version info and exit", h => shouldShowVersion = h != null }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static readonly OptionSet pushoptions = new OptionSet {
|
|
|
|
@ -51,6 +53,7 @@ namespace isn
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private static bool shouldShowHelp;
|
|
|
|
|
private static bool shouldShowVersion;
|
|
|
|
|
private static bool shouldShowSourceHelp;
|
|
|
|
|
private static bool shouldShowPushHelp;
|
|
|
|
|
private static string apiKey = null;
|
|
|
|
@ -150,6 +153,7 @@ namespace isn
|
|
|
|
|
{
|
|
|
|
|
Run = sargs => Add(sargs)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
commandSet.Add(add);
|
|
|
|
|
|
|
|
|
|
var pushCmd = new Command(push)
|
|
|
|
@ -174,6 +178,7 @@ namespace isn
|
|
|
|
|
{
|
|
|
|
|
Run = sargs => StoreApiKey(sargs)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
commandSet.Add(pushCmd);
|
|
|
|
|
commandSet.Add(setapikey);
|
|
|
|
|
commandSet.Add(srcCmd);
|
|
|
|
@ -202,6 +207,11 @@ namespace isn
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (shouldShowVersion)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("isn version " + GitVersionInformation.AssemblySemFileVer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int runCode = commandSet.Run(args);
|
|
|
|
|
return (runCode == 0 && pushKO > 0) ? 500 : runCode;
|
|
|
|
|
|
|
|
|
|