Require NVAlert, fix SHA256 check

This commit is contained in:
2024-07-16 18:06:41 +02:00
parent 70654ae6bc
commit bfe441fb2f
3 changed files with 17 additions and 3 deletions

15
Package.resolved Normal file
View File

@ -0,0 +1,15 @@
{
"originHash" : "0b9d136f905253e9368420218eda771d18cfa528b15553cb08a34c9e5ecdfea7",
"pins" : [
{
"identity" : "nvalert",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nicoverbruggen/NVAlert",
"state" : {
"revision" : "2d649465067e3fc053bc64beed0e2ffea7e1cbe2",
"version" : "1.0.0"
}
}
],
"version" : 3
}

View File

@ -10,8 +10,7 @@ let package = Package(
.library(name: "NVAppUpdater", targets: ["NVAppUpdater"]),
],
dependencies: [
.package(name: "NVAlert", path: "/Users/nicoverbruggen/Code/SwiftPM/NVAlert"),
// .package(url: "https://github.com/nicoverbruggen/NVAlert", branch: "main")
.package(url: "https://github.com/nicoverbruggen/NVAlert", from: "1.0.0")
],
targets: [
.target(name: "NVAppUpdater", dependencies: ["NVAlert"]),

View File

@ -107,7 +107,7 @@ open class SelfUpdater: NSObject, NSApplicationDelegate {
}
// Calculate the checksum for the downloaded file
let checksum = system("openssl dgst -sha256 \"\(updaterPath)/\(filename)\" | awk '{Log.text $NF}'")
let checksum = system("openssl dgst -sha256 \"\(updaterPath)/\(filename)\" | awk '{print $NF}'")
.trimmingCharacters(in: .whitespacesAndNewlines)
// Compare the checksums