diff --git a/Examples/Examples-iOS/IGListKitExamples.xcodeproj/project.pbxproj b/Examples/Examples-iOS/IGListKitExamples.xcodeproj/project.pbxproj index 095feba93..b0e8d042e 100644 --- a/Examples/Examples-iOS/IGListKitExamples.xcodeproj/project.pbxproj +++ b/Examples/Examples-iOS/IGListKitExamples.xcodeproj/project.pbxproj @@ -797,7 +797,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint lint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; + shellScript = "sh ../../scripts/lint.sh"; }; DEB8B682C7C0C2DA4D507589 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; diff --git a/Examples/Examples-macOS/IGListKitExamples.xcodeproj/project.pbxproj b/Examples/Examples-macOS/IGListKitExamples.xcodeproj/project.pbxproj index beef71ac2..257e7e908 100644 --- a/Examples/Examples-macOS/IGListKitExamples.xcodeproj/project.pbxproj +++ b/Examples/Examples-macOS/IGListKitExamples.xcodeproj/project.pbxproj @@ -269,7 +269,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint lint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; + shellScript = "sh ../../scripts/lint.sh"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Examples/Examples-tvOS/IGListKitExamples.xcodeproj/project.pbxproj b/Examples/Examples-tvOS/IGListKitExamples.xcodeproj/project.pbxproj index e5ea343eb..e6892dcfd 100644 --- a/Examples/Examples-tvOS/IGListKitExamples.xcodeproj/project.pbxproj +++ b/Examples/Examples-tvOS/IGListKitExamples.xcodeproj/project.pbxproj @@ -275,7 +275,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint lint --config ../.swiftlint.yml\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; + shellScript = "sh ../../scripts/lint.sh"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/scripts/lint.sh b/scripts/lint.sh new file mode 100644 index 000000000..b684247db --- /dev/null +++ b/scripts/lint.sh @@ -0,0 +1,5 @@ +if which swiftlint >/dev/null && [ $(swiftlint version) == "0.20.1" ]; then + swiftlint lint --config ../.swiftlint.yml +else + echo "warning: SwiftLint not installed or incorrect version installed, download from https://github.com/realm/SwiftLint" +fi