Skip to content

Commit

Permalink
Updated script to pin SwiftLint version
Browse files Browse the repository at this point in the history
Summary:
Issue fixed: Instagram#847

Pinned SwiftLint to 20.1
Closes Instagram#854

Differential Revision: D5407797

Pulled By: rnystrom

fbshipit-source-id: d092e9ff78853d6bb17e6b58d896ab1313e5d3c7
  • Loading branch information
heshamsalman authored and facebook-github-bot committed Jul 12, 2017
1 parent 1d773aa commit 57bd9e2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
5 changes: 5 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 57bd9e2

Please sign in to comment.