error message removal and release script fix
This commit is contained in:
12
Release.ps1
12
Release.ps1
@@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
$ErrorActionPreference = 'Stop'
|
$tmpDir = 'D:\Work'
|
||||||
|
|
||||||
$desktopDir = [Environment]::GetFolderPath('Desktop')
|
|
||||||
$exePath = $PSScriptRoot + '\mpv.net\bin\x64\mpvnet.exe'
|
$exePath = $PSScriptRoot + '\mpv.net\bin\x64\mpvnet.exe'
|
||||||
$versionInfo = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath)
|
$versionInfo = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath)
|
||||||
$vsDir = 'C:\Program Files (x86)\Microsoft Visual Studio\2019'
|
$vsDir = 'C:\Program Files (x86)\Microsoft Visual Studio\2019'
|
||||||
@@ -46,12 +44,12 @@ if ($versionInfo.FilePrivatePart -eq 0)
|
|||||||
& $inno /Darch=x86 setup.iss
|
& $inno /Darch=x86 setup.iss
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
|
|
||||||
$targetDir = $desktopDir + "\mpv.net-portable-x64-$($versionInfo.FileVersion)"
|
$targetDir = $tmpDir + "\mpv.net-portable-x64-$($versionInfo.FileVersion)"
|
||||||
Copy-Item .\mpv.net\bin\x64 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
Copy-Item .\mpv.net\bin\x64 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
||||||
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
|
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
|
|
||||||
$targetDir = $desktopDir + "\mpv.net-portable-x86-$($versionInfo.FileVersion)"
|
$targetDir = $tmpDir + "\mpv.net-portable-x86-$($versionInfo.FileVersion)"
|
||||||
Copy-Item .\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
Copy-Item .\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
||||||
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
|
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
@@ -68,13 +66,13 @@ else
|
|||||||
& $msBuild mpv.net.sln -t:Rebuild -p:Configuration=Debug -p:Platform=x86
|
& $msBuild mpv.net.sln -t:Rebuild -p:Configuration=Debug -p:Platform=x86
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
|
|
||||||
$targetDir = "$desktopDir\mpv.net-portable-x64-$($versionInfo.FileVersion)-beta"
|
$targetDir = "$tmpDir\mpv.net-portable-x64-$($versionInfo.FileVersion)-beta"
|
||||||
Copy-Item .\mpv.net\bin\x64 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
Copy-Item .\mpv.net\bin\x64 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
||||||
& $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*"
|
& $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*"
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
UploadBeta "$targetDir.7z"
|
UploadBeta "$targetDir.7z"
|
||||||
|
|
||||||
$targetDir = $desktopDir + "\mpv.net-portable-x86-$($versionInfo.FileVersion)-beta"
|
$targetDir = $tmpDir + "\mpv.net-portable-x86-$($versionInfo.FileVersion)-beta"
|
||||||
Copy-Item .\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
Copy-Item .\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml
|
||||||
& $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*"
|
& $7z a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*"
|
||||||
if ($LastExitCode) { throw $LastExitCode }
|
if ($LastExitCode) { throw $LastExitCode }
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
public static void WriteError(object obj, string module = "mpv.net")
|
public static void WriteError(object obj, string module = "mpv.net")
|
||||||
{
|
{
|
||||||
Write(obj, module, ConsoleColor.Red, false);
|
Write(obj, module, ConsoleColor.DarkRed, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Write(object obj, string module = "mpv.net")
|
public static void Write(object obj, string module = "mpv.net")
|
||||||
@@ -76,7 +76,7 @@ namespace mpvnet
|
|||||||
if (Padding > 0 && value.Length < Padding)
|
if (Padding > 0 && value.Length < Padding)
|
||||||
value = value.PadRight(Padding);
|
value = value.PadRight(Padding);
|
||||||
|
|
||||||
if (color == ConsoleColor.Red)
|
if (color == ConsoleColor.Red || color == ConsoleColor.DarkRed)
|
||||||
Console.Error.WriteLine(value);
|
Console.Error.WriteLine(value);
|
||||||
else
|
else
|
||||||
Console.WriteLine(value);
|
Console.WriteLine(value);
|
||||||
|
|||||||
@@ -150,12 +150,6 @@ namespace mpvnet
|
|||||||
|
|
||||||
public void ProcessProperty(string name, string value)
|
public void ProcessProperty(string name, string value)
|
||||||
{
|
{
|
||||||
foreach (char i in name)
|
|
||||||
if (char.IsUpper(i))
|
|
||||||
Msg.ShowError("Uppercase char detected: " + name,
|
|
||||||
"mpv properties using the command line and the mpv.conf " +
|
|
||||||
"config file are required to be lowercase.");
|
|
||||||
|
|
||||||
switch (name)
|
switch (name)
|
||||||
{
|
{
|
||||||
case "autofit":
|
case "autofit":
|
||||||
|
|||||||
Reference in New Issue
Block a user