Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

ci(build): multi-arch support #35

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions InjectGUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
38BC1F5A2C4B98A300C3B60E /* AppDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F592C4B98A300C3B60E /* AppDetailView.swift */; };
38BC1F5C2C4BB02200C3B60E /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F5B2C4BB02200C3B60E /* SettingsView.swift */; };
38E944F22C5A761B00B252A3 /* Executor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E944F12C5A761B00B252A3 /* Executor.swift */; };
38E944F52C5A7F6A00B252A3 /* Cache in Frameworks */ = {isa = PBXBuildFile; productRef = 38E944F42C5A7F6A00B252A3 /* Cache */; };
38E944F72C5A85E200B252A3 /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E944F62C5A85E200B252A3 /* Cache.swift */; };
96BC7ED02C65C5E200149818 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 96BC7ECF2C65C5E200149818 /* Localizable.xcstrings */; };
96BC7ED62C65E7B100149818 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BC7ED52C65E7B100149818 /* AboutView.swift */; };
Expand Down Expand Up @@ -79,7 +78,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
38E944F52C5A7F6A00B252A3 /* Cache in Frameworks */,
380D777B2C61EA56005F3150 /* Sparkle in Frameworks */,
383943792C68458F00E5984E /* Inject in Frameworks */,
);
Expand Down Expand Up @@ -214,7 +212,6 @@
);
name = InjectGUI;
packageProductDependencies = (
38E944F42C5A7F6A00B252A3 /* Cache */,
380D777A2C61EA56005F3150 /* Sparkle */,
383943782C68458F00E5984E /* Inject */,
);
Expand Down Expand Up @@ -248,7 +245,6 @@
);
mainGroup = 38877A102C4A6F83009F5910;
packageReferences = (
38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */,
380D77792C61EA56005F3150 /* XCRemoteSwiftPackageReference "Sparkle" */,
383943772C68458F00E5984E /* XCRemoteSwiftPackageReference "Inject" */,
);
Expand Down Expand Up @@ -453,6 +449,7 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.2.2;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"-Xlinker",
"-interposable",
Expand Down Expand Up @@ -547,14 +544,6 @@
minimumVersion = 1.5.2;
};
};
38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/hyperoslo/Cache";
requirement = {
kind = exactVersion;
version = 7.2.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
Expand All @@ -568,11 +557,6 @@
package = 383943772C68458F00E5984E /* XCRemoteSwiftPackageReference "Inject" */;
productName = Inject;
};
38E944F42C5A7F6A00B252A3 /* Cache */ = {
isa = XCSwiftPackageProductDependency;
package = 38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */;
productName = Cache;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 38877A112C4A6F83009F5910 /* Project object */;
Expand Down
28 changes: 14 additions & 14 deletions InjectGUI/Backend/Cache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
//
// Created by wibus on 2024/7/31.
//

import Cache

enum CacheKey {
static let latestCommitHash = "latestCommitHash"
}

// MARK: - Cache Configuration

// 存一个有关 main/latest commit hash 的缓存
let diskConfig = DiskConfig(name: "InjectLib")
let memoryConfig = MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10)
let transformer = TransformerFactory.forCodable(ofType: String.self)
let storage = try! Storage<String, String>(diskConfig: diskConfig, memoryConfig: memoryConfig, transformer: transformer)
//
//import Cache
//
//enum CacheKey {
// static let latestCommitHash = "latestCommitHash"
//}
//
//// MARK: - Cache Configuration
//
//// 存一个有关 main/latest commit hash 的缓存
//let diskConfig = DiskConfig(name: "InjectLib")
//let memoryConfig = MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10)
//let transformer = TransformerFactory.forCodable(ofType: String.self)
//let storage = try! Storage<String, String>(diskConfig: diskConfig, memoryConfig: memoryConfig, transformer: transformer)