Skip to content

Commit

Permalink
Merge pull request ChartsOrg#1 from danielgindi/pr/2378
Browse files Browse the repository at this point in the history
update schemes, move script to file like ChartsRealm
  • Loading branch information
liuxuan30 authored Apr 24, 2017
2 parents 51f862c + f1e2374 commit 6971fa1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Charts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@
06165F2A1D8110E600722320 /* Sources */,
06165F2B1D8110E600722320 /* Frameworks */,
06165F2C1D8110E600722320 /* Resources */,
B6355D621EA9B71800B74B2E /* ShellScript */,
B6355D621EA9B71800B74B2E /* Copy Carthage Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -783,19 +783,20 @@
shellPath = /bin/sh;
shellScript = "exec \"${SRCROOT}/scripts/build-dependencies.sh\"\n";
};
B6355D621EA9B71800B74B2E /* ShellScript */ = {
B6355D621EA9B71800B74B2E /* Copy Carthage Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/$(PLATFORM)/FBSnapshotTestCase.framework",
FBSnapshotTestCase,
);
name = "Copy Carthage Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "carthage copy-frameworks";
shellScript = " exec \"${SRCROOT}/scripts/copy-carthage-frameworks.sh\"";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
17 changes: 17 additions & 0 deletions Charts.xcodeproj/xcshareddata/xcschemes/Charts.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "06165F2D1D8110E600722320"
BuildableName = "ChartsTests.xctest"
BlueprintName = "ChartsTests"
ReferencedContainer = "container:Charts.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -61,6 +71,13 @@
ReferencedContainer = "container:Charts.xcodeproj">
</BuildableReference>
</MacroExpansion>
<EnvironmentVariables>
<EnvironmentVariable
key = "FB_REFERENCE_IMAGE_DIR"
value = "$(SOURCE_ROOT)/Tests/ReferenceImages"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
24 changes: 24 additions & 0 deletions scripts/copy-carthage-frameworks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

case "$PLATFORM_NAME" in
macosx) plat=Mac;;
iphone*) plat=iOS;;
watch*) plat=watchOS;;
appletv*) plat=tvOS;;
*) echo "error: Unknown PLATFORM_NAME: $PLATFORM_NAME"; exit 1;;
esac

for (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do
VAR=SCRIPT_INPUT_FILE_$n
framework=$(basename "${!VAR}")
export SCRIPT_INPUT_FILE_$n="$SRCROOT"/Carthage/Build/$plat/"$framework".framework
done

/usr/local/bin/carthage copy-frameworks || exit

for (( n = 0; n < SCRIPT_INPUT_FILE_COUNT; n++ )); do
VAR=SCRIPT_INPUT_FILE_$n
source=${!VAR}.dSYM
dest=${BUILT_PRODUCTS_DIR}/$(basename "$source")
ditto "$source" "$dest" || exit
done

0 comments on commit 6971fa1

Please sign in to comment.