diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6195fc210..3b42fd831 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: uses: robinraju/release-downloader@v1.10 with: repository: 'MetaCubeX/mihomo' - tag: "v1.18.4" + tag: "v1.18.5" fileName: ".*darwin.*64-v.*.gz" # releaseId: "62870807" diff --git a/ClashX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ClashX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 924c10c0f..5151f2f47 100644 --- a/ClashX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ClashX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire", "state" : { - "revision" : "b2fa556e4e48cbf06cf8c63def138c98f4b811fa", - "version" : "5.8.0" + "revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a", + "version" : "5.9.1" } }, { @@ -16,7 +16,7 @@ "location" : "https://github.com/mrFq1/ClashX-Dashboard", "state" : { "branch" : "dev", - "revision" : "dd8a8f8f23838aa8d0ecc38734e915280604ed89" + "revision" : "21c2a6fe2d4578f4aed37be06e2cc9e4fc895353" } }, { @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/CocoaLumberjack/CocoaLumberjack", "state" : { - "revision" : "67ec5818a757aba4d7c534e21a905d878d128dbf", - "version" : "3.8.1" + "revision" : "4b8714a7fb84d42393314ce897127b3939885ec3", + "version" : "3.8.5" } }, { @@ -60,8 +60,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/sindresorhus/KeyboardShortcuts.git", "state" : { - "revision" : "ac302e21da5883f4bd0490cbd0cb710b08740500", - "version" : "1.15.0" + "revision" : "ac12762853126cf2e7ad63a6a58e1c9f58c6a0ee", + "version" : "1.17.0" } }, { @@ -96,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ReactiveX/RxSwift", "state" : { - "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4", - "version" : "6.6.0" + "revision" : "b06a8c8596e4c3e8e7788e08e720e3248563ce6a", + "version" : "6.7.1" } }, { @@ -112,10 +112,10 @@ { "identity" : "swift-log", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-log.git", + "location" : "https://github.com/apple/swift-log", "state" : { - "revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed", - "version" : "1.5.3" + "revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5", + "version" : "1.5.4" } }, { @@ -132,8 +132,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/siteline/swiftui-introspect", "state" : { - "revision" : "0cd2a5a5895306bc21d54a2254302d24a9a571e4", - "version" : "1.1.3" + "revision" : "7dc5b287f8040e4ad5038739850b758e78f77808", + "version" : "1.1.4" } }, { @@ -141,8 +141,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/SwiftyJSON/SwiftyJSON", "state" : { - "revision" : "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07", - "version" : "5.0.1" + "revision" : "af76cf3ef710b6ca5f8c05f3a31307d44a3c5828", + "version" : "5.0.2" } }, { @@ -150,8 +150,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams", "state" : { - "revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", - "version" : "5.0.6" + "revision" : "9234124cff5e22e178988c18d8b95a8ae8007f76", + "version" : "5.1.2" } } ], diff --git a/ClashX/General/AlphaMetaDownloader.swift b/ClashX/General/AlphaMetaDownloader.swift index 9e642ebc4..590e6d626 100644 --- a/ClashX/General/AlphaMetaDownloader.swift +++ b/ClashX/General/AlphaMetaDownloader.swift @@ -54,9 +54,9 @@ class AlphaMetaDownloader: NSObject { static func assetName() -> String? { switch GetMachineHardwareName() { case "x86_64": - return "darwin-amd64" + return "amd64" case "arm64": - return "darwin-arm64" + return "arm64" default: return nil } @@ -87,11 +87,16 @@ class AlphaMetaDownloader: NSObject { guard let assetName, let asset = assets.first(where: { - $0.name.contains(assetName) && - !$0.name.contains("cgo") && - !$0.name.contains("go120") && - $0.state == "uploaded" && - $0.contentType == "application/gzip" + guard $0.state == "uploaded", $0.contentType == "application/gzip" else { return false } + + let names = $0.name.split(separator: "-").map(String.init) + guard names.count > 4, + names[0] == "mihomo", + names[1] == "darwin", + names[2] == assetName, + names[3] == "alpha" else { return false } + + return true }) else { resolver.reject(errors.decodeReleaseInfoFailed) return