You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SampleComponentLibraryApp/SampleComponentLibraryApp.xcodeproj/project.pbxproj
+2-2
Original file line number
Diff line number
Diff line change
@@ -241,10 +241,10 @@
241
241
isa = PBXNativeTarget;
242
242
buildConfigurationList = 8A2FE6782A55EE3F0036B6AF /* Build configuration list for PBXNativeTarget "SampleComponentLibraryApp" */;
243
243
buildPhases = (
244
+
8A2FE6922A55F1880036B6AF /* Swiftlint */,
244
245
8A2FE64A2A55EE3D0036B6AF /* Sources */,
245
246
8A2FE64C2A55EE3D0036B6AF /* Resources */,
246
247
8A2FE64B2A55EE3D0036B6AF /* Frameworks */,
247
-
8A2FE6922A55F1880036B6AF /* Swiftlint */,
248
248
);
249
249
buildRules = (
250
250
);
@@ -321,7 +321,7 @@
321
321
);
322
322
runOnlyForDeploymentPostprocessing = 0;
323
323
shellPath = /bin/sh;
324
-
shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
324
+
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nMODIFIED_FILES=$(git diff --name-only --diff-filter=ACM | grep -e '\\.swift$')\n\nSWIFTLINT_ROOT=\"${SRCROOT}/..\"\n\nif which swiftlint > /dev/null; then\n # Move to the location of the root Swiftlint config file in\n # order to use nested configurations\n cd ${SWIFTLINT_ROOT}\n\n swiftlint lint ${MODIFIED_FILES}\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
0 commit comments