fix
This commit is contained in:
@@ -179,6 +179,7 @@ function Write-Appcast {
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Path,
|
||||
[Parameter(Mandatory = $true)][string]$Version,
|
||||
[Parameter(Mandatory = $true)][string]$BuildVersion,
|
||||
[Parameter(Mandatory = $true)][string]$Notes,
|
||||
[Parameter(Mandatory = $true)][string]$InstallerUrl,
|
||||
[Parameter(Mandatory = $true)][string]$Signature,
|
||||
@@ -229,7 +230,7 @@ function Write-Appcast {
|
||||
'sparkle',
|
||||
'version',
|
||||
$script:SparkleNamespace,
|
||||
$Version
|
||||
$BuildVersion
|
||||
)
|
||||
$writer.WriteAttributeString(
|
||||
'sparkle',
|
||||
@@ -469,9 +470,10 @@ try {
|
||||
-UseBasicParsing `
|
||||
-OutFile $publishedPath
|
||||
$publishedVersion = Get-AppcastVersion -Path $publishedPath
|
||||
$publishedReleaseVersion = $publishedVersion.Split('+')[0]
|
||||
if (
|
||||
-not [string]::IsNullOrWhiteSpace($publishedVersion) -and
|
||||
[version]$version -le [version]$publishedVersion
|
||||
[version]$version -le [version]$publishedReleaseVersion
|
||||
) {
|
||||
throw (
|
||||
"Version $version is not newer than published version " +
|
||||
@@ -573,6 +575,7 @@ try {
|
||||
'/' +
|
||||
$S3Key
|
||||
)
|
||||
$appcastBuildVersion = "$version+$buildNumber"
|
||||
$appcastPath = if ($DryRun) {
|
||||
Join-Path $temporaryDirectory 'appcast.xml'
|
||||
}
|
||||
@@ -583,6 +586,7 @@ try {
|
||||
Write-Appcast `
|
||||
-Path $appcastPath `
|
||||
-Version $version `
|
||||
-BuildVersion $appcastBuildVersion `
|
||||
-Notes $ReleaseNotes `
|
||||
-InstallerUrl $installerUrl `
|
||||
-Signature $signature `
|
||||
@@ -592,7 +596,7 @@ try {
|
||||
-LiteralPath $appcastPath `
|
||||
-Raw `
|
||||
-Encoding UTF8
|
||||
if ((Get-AppcastVersion -Path $appcastPath) -ne $version) {
|
||||
if ((Get-AppcastVersion -Path $appcastPath) -ne $appcastBuildVersion) {
|
||||
throw 'The generated AppCast contains the wrong version.'
|
||||
}
|
||||
|
||||
@@ -721,7 +725,7 @@ print("S3_CONTENT_LENGTH=" + str(response["ContentLength"]))
|
||||
$publishedEnclosure.GetAttribute(
|
||||
'version',
|
||||
$script:SparkleNamespace
|
||||
) -ne $version -or
|
||||
) -ne $appcastBuildVersion -or
|
||||
[long]$publishedEnclosure.length -ne $installer.Length -or
|
||||
$publishedEnclosure.url -ne $installerUrl
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user