Skip to content

Only attempt to install pods when linting strings if CP is found#136

Merged
mokagio merged 2 commits intotrunkfrom
mokagio/bypass-cp-localization-lint
Jan 7, 2025
Merged

Only attempt to install pods when linting strings if CP is found#136
mokagio merged 2 commits intotrunkfrom
mokagio/bypass-cp-localization-lint

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented Jan 7, 2025

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.

Example in action: https://buildkite.com/automattic/wordpress-ios/builds/25292#01943fbf-a124-4d9e-910a-b1cb8871bfcb

image


  • I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary.

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.
@mokagio mokagio marked this pull request as ready for review January 7, 2025 07:58
@mokagio mokagio enabled auto-merge (squash) January 7, 2025 15:44
Comment on lines 15 to +20
echo "--- :cocoapods: Setting up Pods"
install_cocoapods
if [[ -f Podfile.lock ]]; then
install_cocoapods
else
echo "CocoaPods setup not detected. Skipping CocoaPods installation..."
fi
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered moving the header (--- :cocoapods:...) in the if too, but I thought it useful to show it in the logs even when the action is skipped. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed 👍

@mokagio mokagio requested a review from a team January 7, 2025 15:45
Comment on lines 15 to +20
echo "--- :cocoapods: Setting up Pods"
install_cocoapods
if [[ -f Podfile.lock ]]; then
install_cocoapods
else
echo "CocoaPods setup not detected. Skipping CocoaPods installation..."
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed 👍

@mokagio mokagio merged commit 702d1b1 into trunk Jan 7, 2025
15 checks passed
@mokagio mokagio deleted the mokagio/bypass-cp-localization-lint branch January 7, 2025 15:54
mokagio added a commit that referenced this pull request Feb 3, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants