|
|
|
@ -42,9 +42,11 @@ namespace isn
|
|
|
|
|
{ "v|version", "show soft version info and exit", h => shouldShowVersion = h != null }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static string apiKey;
|
|
|
|
|
|
|
|
|
|
static readonly OptionSet pushoptions = new OptionSet {
|
|
|
|
|
{ "k|api-key=", "use api key", val => apiKey = apiKey ?? val },
|
|
|
|
|
{ "p|store-api-key", "store used api key (=<true|false>)", val => storApiKey = val != null },
|
|
|
|
|
{ "p|store-api-key", "store used api key", val => storApiKey = val != null },
|
|
|
|
|
{ "s|source=", "use source", val => CurrentSource = CurrentSource ?? val },
|
|
|
|
|
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
|
|
|
|
|
};
|
|
|
|
@ -60,10 +62,8 @@ namespace isn
|
|
|
|
|
private static bool shouldShowVersion;
|
|
|
|
|
private static bool shouldShowSourceHelp;
|
|
|
|
|
private static bool shouldShowPushHelp;
|
|
|
|
|
private static string apiKey = null;
|
|
|
|
|
private static string currentSource = null;
|
|
|
|
|
private static bool storApiKey = false;
|
|
|
|
|
public static IDataProtector Protector { get; set; } = new DefaultDataProtector();
|
|
|
|
|
|
|
|
|
|
static Settings settings = null;
|
|
|
|
|
|
|
|
|
@ -74,11 +74,13 @@ namespace isn
|
|
|
|
|
if (settings == null)
|
|
|
|
|
LoadConfig();
|
|
|
|
|
if (settings == null)
|
|
|
|
|
{
|
|
|
|
|
settings = new Settings
|
|
|
|
|
{
|
|
|
|
|
DataProtectionTitle = "isn",
|
|
|
|
|
Sources = new Dictionary<string, SourceSettings>()
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return settings;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -174,7 +176,6 @@ namespace isn
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
List<PushReport> reports = PushPkg(pargs);
|
|
|
|
|
Console.WriteLine(JsonConvert.SerializeObject(reports));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|