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

build: change Swiftlint not running when Carthage builds #54

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Bucketeer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "#Run this script if not in a CI environment.\nif [ -n $CI ] && [ $CI = \"true\" ]; then\n echo \"Run this script if not in a CI environment.\"\n exit 0\nfi\n\n#Workaround: Add Homebrew Path for M1 Mac.\nif [ $(uname -m) = \"arm64\" ]; then\n export PATH=\"/opt/homebrew/bin:/opt/homebrew/sbin:${PATH+:$PATH}\";\nfi\n\nif which mint >/dev/null; then\n make run-lint\nelse\n echo \"Warning: Mint is not installed. Please run make install-mint.\"\nfi\n";
shellScript = "#Run this script if not in a CI environment or Carthage build.\nif [ -n $CI ] && [ \"$CI\" = \"true\" ]; then\n echo \"Run this script if not in a CI environment.\"\n exit 0\nelif [ -n \"$CARTHAGE\" ]; then\n echo \"Run this script if not in Carthage build.\"\n exit 0\nfi\n\n#Workaround: Add Homebrew Path for M1 Mac.\nif [ $(uname -m) = \"arm64\" ]; then\n export PATH=\"/opt/homebrew/bin:/opt/homebrew/sbin:${PATH+:$PATH}\";\nfi\n\nif which mint >/dev/null; then\n make run-lint\nelse\n echo \"Warning: Mint is not installed. Please run make install-mint.\"\nfi\n";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since "CARTHAGE=YES" is set as a parameter when building Carthage, I have modified it so that it is used to judge the execution of Swiftlint.

Run Script(linter)

#Run this script if not in a CI environment or Carthage build.
if [ -n $CI ] && [ "$CI" = "true" ]; then
  echo "Run this script if not in a CI environment."
  exit 0
elif [ -n "$CARTHAGE" ]; then
  echo "Run this script if not in Carthage build."
  exit 0
fi

...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @kakcy
I tried your solution and it works 👍🏻.
this changes are nice to have

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-11-29 at 21 52 01

};
/* End PBXShellScriptBuildPhase section */

Expand Down