Skip to content

Commit

Permalink
load Bundle.module
Browse files Browse the repository at this point in the history
  • Loading branch information
freddi-kit committed Sep 6, 2023
1 parent 2ed1bee commit 512ec95
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ archive: build
--package-version $(VERSION) \
--executable-name $(EXECUTABLE_NAME) \
--build-config release \
--include-resource-path $(CURRENT_PATH)/SettingPresets
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/freddi-kit/ArtifactBundleGen",
"state" : {
"revision" : "8e03c58cb2648276544bbd52fe2e18ef5a4fa5af",
"version" : "0.0.3"
"revision" : "0c5cdf2d8e522aaf32d2f441efd002b757c5a4d2",
"version" : "0.0.4"
}
},
{
Expand Down
4 changes: 3 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription

let macOSOnlyDependency: [Package.Dependency]
#if !os(Linux)
macOSOnlyDependency = [Package.Dependency.package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.3")]
macOSOnlyDependency = [Package.Dependency.package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.4")]
#else
macOSOnlyDependency = []
#endif
Expand Down Expand Up @@ -48,6 +48,8 @@ let package = Package(
"PathKit",
"XcodeGenCore",
"GraphViz",
], resources: [
.copy("SettingPresets")
]),
.target(name: "ProjectSpec", dependencies: [
"JSONUtilities",
Expand Down
1 change: 1 addition & 0 deletions Sources/XcodeGenKit/SettingPresets
3 changes: 3 additions & 0 deletions Sources/XcodeGenKit/SettingsBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ extension SettingsPresetFile {
symlink.parent() + relativePath,
] + possibleSettingsPaths
}
if let moduleResourcePath = Bundle.module.path(forResource: "SettingPresets", ofType: nil) {
possibleSettingsPaths.append(Path(moduleResourcePath) + "\(path).yml")
}

guard let settingsPath = possibleSettingsPaths.first(where: { $0.exists }) else {
switch self {
Expand Down

0 comments on commit 512ec95

Please sign in to comment.