Skip to content

Commit

Permalink
Merge branch 'meta-dev' into meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mrFq1 committed May 21, 2024
2 parents 0c0964a + 90938ee commit 537a6b1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand All @@ -16,16 +16,16 @@
"location" : "https://github.com/mrFq1/ClashX-Dashboard",
"state" : {
"branch" : "dev",
"revision" : "dd8a8f8f23838aa8d0ecc38734e915280604ed89"
"revision" : "21c2a6fe2d4578f4aed37be06e2cc9e4fc895353"
}
},
{
"identity" : "cocoalumberjack",
"kind" : "remoteSourceControl",
"location" : "https://github.com/CocoaLumberjack/CocoaLumberjack",
"state" : {
"revision" : "67ec5818a757aba4d7c534e21a905d878d128dbf",
"version" : "3.8.1"
"revision" : "4b8714a7fb84d42393314ce897127b3939885ec3",
"version" : "3.8.5"
}
},
{
Expand Down Expand Up @@ -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"
}
},
{
Expand Down Expand Up @@ -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"
}
},
{
Expand All @@ -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"
}
},
{
Expand All @@ -132,26 +132,26 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/swiftui-introspect",
"state" : {
"revision" : "0cd2a5a5895306bc21d54a2254302d24a9a571e4",
"version" : "1.1.3"
"revision" : "7dc5b287f8040e4ad5038739850b758e78f77808",
"version" : "1.1.4"
}
},
{
"identity" : "swiftyjson",
"kind" : "remoteSourceControl",
"location" : "https://github.com/SwiftyJSON/SwiftyJSON",
"state" : {
"revision" : "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07",
"version" : "5.0.1"
"revision" : "af76cf3ef710b6ca5f8c05f3a31307d44a3c5828",
"version" : "5.0.2"
}
},
{
"identity" : "yams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/Yams",
"state" : {
"revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3",
"version" : "5.0.6"
"revision" : "9234124cff5e22e178988c18d8b95a8ae8007f76",
"version" : "5.1.2"
}
}
],
Expand Down
19 changes: 12 additions & 7 deletions ClashX/General/AlphaMetaDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 537a6b1

Please sign in to comment.