Skip to content

Commit

Permalink
Only attempt to install pods when linting strings if CP is found (#136)
Browse files Browse the repository at this point in the history
As we start removing CocoaPods from some of our projects, we can no
longer assume pods exist locally to install.

See wordpress-mobile/WordPress-iOS#23951 which
prompted this change.
  • Loading branch information
mokagio committed Feb 3, 2025
1 parent 22f6f29 commit a911f3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ _None._

### New Features

_None._
- `lint_localized_strings_format` will bypass CocoaPods if a `Podfile.lock` is not found [#136]

### Bug Fixes

Expand Down
6 changes: 5 additions & 1 deletion bin/lint_localized_strings_format
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ install_gems
# The strings generation also picks up files from our first party libraries,
# some of which are installed via CocoaPods
echo "--- :cocoapods: Setting up Pods"
install_cocoapods
if [[ -f Podfile.lock ]]; then
install_cocoapods
else
echo "CocoaPods setup not detected. Skipping CocoaPods installation..."
fi

echo "--- :sleuth_or_spy: Lint Apple Localized Strings Format"
# A next step improvement is to move the logs management within the release
Expand Down

0 comments on commit a911f3f

Please sign in to comment.