mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-17 02:33:27 +01:00
[Beta-Updates]: fix verify step for beta artifact verifications
This commit is contained in:
@@ -129,9 +129,13 @@ private extension VerifyAppOperation
|
|||||||
{
|
{
|
||||||
let (version, buildVersion) = await $appVersion.perform { ($0.version, $0.buildVersion) }
|
let (version, buildVersion) = await $appVersion.perform { ($0.version, $0.buildVersion) }
|
||||||
|
|
||||||
let downloadedIpaRevision = Bundle.init(url: app.fileURL)!.object(forInfoDictionaryKey: "BuildRevision") as? String ?? ""
|
let downloadedIpaRevision = Bundle(url: app.fileURL)!.object(forInfoDictionaryKey: "BuildRevision") as? String ?? ""
|
||||||
|
let sourceJsonIpaRevision = appVersion.revision
|
||||||
guard version == app.version else { throw VerificationError.mismatchedVersion(app.version, expectedVersion: version, app: app) }
|
|
||||||
|
// if not beta but version matches, then accept it, else compare revisions between source and downloaded
|
||||||
|
if version != app.version || (appVersion.isBeta && downloadedIpaRevision != sourceJsonIpaRevision) {
|
||||||
|
throw VerificationError.mismatchedVersion(app.version, expectedVersion: version, app: app)
|
||||||
|
}
|
||||||
|
|
||||||
if let buildVersion
|
if let buildVersion
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<attribute name="buildVersion" optional="YES" attributeType="String"/>
|
<attribute name="buildVersion" optional="YES" attributeType="String"/>
|
||||||
<attribute name="date" attributeType="Date" usesScalarValueType="NO"/>
|
<attribute name="date" attributeType="Date" usesScalarValueType="NO"/>
|
||||||
<attribute name="downloadURL" attributeType="URI"/>
|
<attribute name="downloadURL" attributeType="URI"/>
|
||||||
|
<attribute name="isBeta" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
|
||||||
<attribute name="localizedDescription" optional="YES" attributeType="String"/>
|
<attribute name="localizedDescription" optional="YES" attributeType="String"/>
|
||||||
<attribute name="maxOSVersion" optional="YES" attributeType="String"/>
|
<attribute name="maxOSVersion" optional="YES" attributeType="String"/>
|
||||||
<attribute name="minOSVersion" optional="YES" attributeType="String"/>
|
<attribute name="minOSVersion" optional="YES" attributeType="String"/>
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ public class AppVersion: NSManagedObject, Decodable, Fetchable
|
|||||||
self._minOSVersion = try container.decodeIfPresent(String.self, forKey: .minOSVersion)
|
self._minOSVersion = try container.decodeIfPresent(String.self, forKey: .minOSVersion)
|
||||||
self._maxOSVersion = try container.decodeIfPresent(String.self, forKey: .maxOSVersion)
|
self._maxOSVersion = try container.decodeIfPresent(String.self, forKey: .maxOSVersion)
|
||||||
|
|
||||||
// self.isBeta = try container.decodeIfPresent(Bool.self, forKey: .isBeta) ?? false
|
self.isBeta = try container.decodeIfPresent(Bool.self, forKey: .isBeta) ?? false
|
||||||
// self.revision = try container.decodeIfPresent(String.self, forKey: .revision)
|
self.revision = try container.decodeIfPresent(String.self, forKey: .revision)
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user