Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMM-1206 Make DatadogCrashReporting static in Package.swift #449

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let package = Package(
),
.library(
name: "DatadogCrashReporting",
type: .dynamic,
type: .static,
targets: ["DatadogCrashReporting"]
),
],
Expand Down
8 changes: 8 additions & 0 deletions dependency-manager-tests/spm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ test:
@cp -r SPMProject.xcodeproj.src SPMProject.xcodeproj
@sed "s|REMOTE_GIT_BRANCH|${GIT_BRANCH}|g" SPMProject.xcodeproj.src/project.pbxproj > SPMProject.xcodeproj/project.pbxproj
@echo "OK 👌"

create-src-from-xcodeproj:
@echo "⚙️ Creating 'SPMProject.xcodeproj.src' from SPMProject.xcodeproj"
rm -rf SPMProject.xcodeproj.src
cp -r SPMProject.xcodeproj SPMProject.xcodeproj.src
rm SPMProject.xcodeproj.src/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
sed "s|\"${GIT_BRANCH}\"|REMOTE_GIT_BRANCH|g" SPMProject.xcodeproj/project.pbxproj > SPMProject.xcodeproj.src/project.pbxproj
@echo "OK 👌"
10 changes: 9 additions & 1 deletion dependency-manager-tests/spm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ After pushing current branch to remote, run:
```bash
$ make
```
Then, open `SPMProject.xcodeproj` to check if SPM is able to fetch `Datadog` dependency from current branch and build the project.
This will create the `SPMProject.xcodeproj` from `SPMProject.xcodeproj.src` by replacing the `REMOTE_GIT_BRANCH` string with the name of the remote branch.

Launch the `SPMProject.xcodeproj` to check if SPM is able to fetch `Datadog` package from remote and build the project.

If you need to update the setup in `SPMProject.xcodeproj`, use:
```bash
make create-src-from-xcodeproj
```
to apply it back to the `SPMProject.xcodeproj.src`, so it can be committed to git.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
61C363E624374D6000C4D4E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61C363E424374D6000C4D4E6 /* LaunchScreen.storyboard */; };
61C363F124374D6100C4D4E6 /* SPMProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C363F024374D6100C4D4E6 /* SPMProjectTests.swift */; };
61C363FC24374D6100C4D4E6 /* SPMProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C363FB24374D6100C4D4E6 /* SPMProjectUITests.swift */; };
61C4DBDE25C2FB0B0058DED4 /* DatadogCrashReporting in Frameworks */ = {isa = PBXBuildFile; productRef = 61C4DBDD25C2FB0B0058DED4 /* DatadogCrashReporting */; };
61C4DBDF25C2FB0B0058DED4 /* DatadogCrashReporting in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 61C4DBDD25C2FB0B0058DED4 /* DatadogCrashReporting */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
61DA9CB4260BA1FA00366408 /* DatadogCrashReporting in Frameworks */ = {isa = PBXBuildFile; productRef = 61DA9CB3260BA1FA00366408 /* DatadogCrashReporting */; };
61DA9CB6260BA1FA00366408 /* DatadogStatic in Frameworks */ = {isa = PBXBuildFile; productRef = 61DA9CB5260BA1FA00366408 /* DatadogStatic */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -42,7 +42,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
61C4DBDF25C2FB0B0058DED4 /* DatadogCrashReporting in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -72,7 +71,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
61C4DBDE25C2FB0B0058DED4 /* DatadogCrashReporting in Frameworks */,
61DA9CB4260BA1FA00366408 /* DatadogCrashReporting in Frameworks */,
61DA9CB6260BA1FA00366408 /* DatadogStatic in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -182,7 +182,8 @@
);
name = SPMProject;
packageProductDependencies = (
61C4DBDD25C2FB0B0058DED4 /* DatadogCrashReporting */,
61DA9CB3260BA1FA00366408 /* DatadogCrashReporting */,
61DA9CB5260BA1FA00366408 /* DatadogStatic */,
);
productName = SPMProject;
productReference = 61C363D624374D5F00C4D4E6 /* SPMProject.app */;
Expand Down Expand Up @@ -689,11 +690,16 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
61C4DBDD25C2FB0B0058DED4 /* DatadogCrashReporting */ = {
61DA9CB3260BA1FA00366408 /* DatadogCrashReporting */ = {
isa = XCSwiftPackageProductDependency;
package = 61C3640924374DF200C4D4E6 /* XCRemoteSwiftPackageReference "dd-sdk-ios" */;
productName = DatadogCrashReporting;
};
61DA9CB5260BA1FA00366408 /* DatadogStatic */ = {
isa = XCSwiftPackageProductDependency;
package = 61C3640924374DF200C4D4E6 /* XCRemoteSwiftPackageReference "dd-sdk-ios" */;
productName = DatadogStatic;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 61C363CE24374D5F00C4D4E6 /* Project object */;
Expand Down