5.6.1.0 Beta

This commit is contained in:
stax76
2022-03-05 14:59:05 +01:00
parent e8d6081f9f
commit 8066d07a76
7 changed files with 16 additions and 75 deletions

View File

@@ -2,54 +2,11 @@
$tmpDir = 'D:\Work'
$exePath = $PSScriptRoot + '\bin\mpvnet.exe'
$versionInfo = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath)
$inno = 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe'
$7z = 'C:\Program Files\7-Zip\7z.exe'
$cloudDirectories = 'C:\Users\frank\OneDrive\Public\mpv.net\',
'C:\Users\frank\Dropbox\Public\mpv.net\'
function UploadBeta($sourceFile)
{
foreach ($cloudDirectory in $cloudDirectories)
{
if (-not (Test-Path $cloudDirectory))
{
throw $cloudDirectory
}
$targetFile = $cloudDirectory + (Split-Path $sourceFile -Leaf)
if (Test-Path $targetFile)
{
throw $targetFile
}
Copy-Item $sourceFile $targetFile
}
}
if ($versionInfo.FilePrivatePart -eq 0)
{
& $inno $PSScriptRoot\setup.iss
if ($LastExitCode) { throw $LastExitCode }
$targetDir = $tmpDir + "\mpv.net-$($versionInfo.FileVersion)-portable"
Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
if ($LastExitCode) { throw $LastExitCode }
}
else
{
$targetDir = "$tmpDir\mpv.net-$($versionInfo.FileVersion)-portable-beta"
Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
if ($LastExitCode) { throw $LastExitCode }
UploadBeta "$targetDir.zip"
foreach ($cloudDirectory in $cloudDirectories)
{
Invoke-Item $cloudDirectory
}
}
$targetDir = $tmpDir + "\mpv.net-$($versionInfo.FileVersion)-portable-beta"
Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
if ($LastExitCode) { throw $LastExitCode }
Write-Host 'successfully finished' -ForegroundColor Green