mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 20:20:34 +12:00
Added "-Job" argument
This commit is contained in:
parent
db9879ede3
commit
4772d8bb6c
|
@ -164,34 +164,27 @@ private static void CheckArgs(string[] args)
|
|||
CLIManager cli = new CLIManager(args);
|
||||
cli.ParseCommands();
|
||||
|
||||
CLICommand command = cli.GetCommand("AppVeyor");
|
||||
AppVeyor = cli.IsCommandExist("AppVeyor");
|
||||
|
||||
if (AppVeyor)
|
||||
{
|
||||
Console.WriteLine("AppVeyor: " + AppVeyor);
|
||||
}
|
||||
|
||||
CLICommand command = cli.GetCommand("Job");
|
||||
|
||||
if (command != null)
|
||||
{
|
||||
AppVeyor = true;
|
||||
string parameter = command.Parameter;
|
||||
|
||||
string configuration = command.Parameter;
|
||||
|
||||
Console.WriteLine("AppVeyor: " + configuration);
|
||||
|
||||
if (configuration.Equals("Release", StringComparison.OrdinalIgnoreCase))
|
||||
if (Enum.TryParse(parameter, out SetupJobs job))
|
||||
{
|
||||
Job = SetupJobs.Release;
|
||||
}
|
||||
else if (configuration.Equals("Debug", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Job = SetupJobs.Debug;
|
||||
}
|
||||
else if (configuration.Equals("Steam", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Job = SetupJobs.Steam;
|
||||
}
|
||||
else if (configuration.Equals("MicrosoftStore", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Job = SetupJobs.MicrosoftStore;
|
||||
Job = job;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Invalid job: " + parameter);
|
||||
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ after_build:
|
|||
- ps: |
|
||||
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)
|
||||
{
|
||||
& "ShareX.Setup\bin\$env:CONFIGURATION\ShareX.Setup.exe" -AppVeyor "$env:CONFIGURATION"
|
||||
& "ShareX.Setup\bin\$env:CONFIGURATION\ShareX.Setup.exe" -AppVeyor -Job "$env:CONFIGURATION"
|
||||
}
|
||||
artifacts:
|
||||
- path: ShareX-*-setup.exe
|
||||
|
|
Loading…
Reference in a new issue