Skip to content

Commit 2c15007

Browse files
authored
Support Artifact Bundle (#1388)
* support artifact bundle * update CHANGELOG to exact PR * build ArtifactBundle only on macOS * update to copy SettingPresets into bundle * fix CHANGELOG.md * load Bundle.module * update ArtifactBundleGen * update ArtifactBundleGen to linux issue * fix unnecessary code * add lisence to bundle
1 parent 6bbf2c6 commit 2c15007

File tree

8 files changed

+27
-3
lines changed

8 files changed

+27
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ xcuserdata
77
*.xcuserstate
88
XcodeGen.xcodeproj
99
xcodegen.zip
10+
xcodegen.artifactbundle.zip
1011
.vscode/launch.json

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Change Log
22

33
## Next Version
4+
### Added
5+
6+
- Support Artifact Bundle #1388 @freddi-kit
47

58
## 2.38.0
69

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,8 @@ brew:
4848

4949
archive: build
5050
./scripts/archive.sh "$(EXECUTABLE_PATH)"
51+
swift package plugin --allow-writing-to-package-directory generate-artifact-bundle \
52+
--package-version $(VERSION) \
53+
--executable-name $(EXECUTABLE_NAME) \
54+
--build-config release \
55+
--include-resource-path LICENSE

Package.resolved

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99
"version" : "4.6.1"
1010
}
1111
},
12+
{
13+
"identity" : "artifactbundlegen",
14+
"kind" : "remoteSourceControl",
15+
"location" : "https://github.com/freddi-kit/ArtifactBundleGen",
16+
"state" : {
17+
"revision" : "707e4ccc4b1c7e48e881cd5ea91e493a95df24bf",
18+
"version" : "0.0.6"
19+
}
20+
},
1221
{
1322
"identity" : "graphviz",
1423
"kind" : "remoteSourceControl",

Package.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ let package = Package(
2020
.package(url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.3"),
2121
.package(url: "https://github.com/mxcl/Version", from: "2.0.0"),
2222
.package(url: "https://github.com/SwiftDocOrg/GraphViz.git", exact: "0.2.0"),
23+
.package(url: "https://github.com/freddi-kit/ArtifactBundleGen", exact: "0.0.6")
2324
],
24-
2525
targets: [
2626
.executableTarget(name: "XcodeGen", dependencies: [
2727
"XcodeGenCLI",
@@ -42,6 +42,8 @@ let package = Package(
4242
"PathKit",
4343
"XcodeGenCore",
4444
"GraphViz",
45+
], resources: [
46+
.copy("SettingPresets")
4547
]),
4648
.target(name: "ProjectSpec", dependencies: [
4749
"JSONUtilities",

RELEASE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
1. Run `make release`
88
1. Push commit and tag to github
99
1. Create release from tag on GitHub using the version number and relevant changelog contents
10-
1. Run `make archive` and upload `xcodegen.zip` to the github release
11-
1. Run `make brew` which will open a PR on homebrew core
10+
1. Run `make archive` and upload `xcodegen.zip` and `xcodegen.artifactbundle.zip` to the github release
11+
1. Run `make brew` which will open a PR on homebrew core

Sources/XcodeGenKit/SettingPresets

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../SettingPresets/

Sources/XcodeGenKit/SettingsBuilder.swift

+3
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ extension SettingsPresetFile {
249249
symlink.parent() + relativePath,
250250
] + possibleSettingsPaths
251251
}
252+
if let moduleResourcePath = Bundle.module.path(forResource: "SettingPresets", ofType: nil) {
253+
possibleSettingsPaths.append(Path(moduleResourcePath) + "\(path).yml")
254+
}
252255

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

0 commit comments

Comments
 (0)