-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix ios CD/CD #87
Fix ios CD/CD #87
Conversation
Warning Rate Limit Exceeded@cp-sneha-s has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 7 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent updates focus on refining the deployment process for an iOS application. The changes streamline the workflow trigger in the CI/CD pipeline, enhance security certificate handling during the build, and improve provisioning profile management. These modifications aim to simplify the deployment process, ensure better security practices, and facilitate smoother profile handling, ultimately making the deployment more efficient and reliable. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/ios_deploy.yml (2 hunks)
- ios/install_dist_profile.sh (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/ios_deploy.yml
Additional comments: 2
ios/install_dist_profile.sh (2)
- 8-8: Creating a directory for provisioning profiles is a good practice for organization and ensures that the profiles are stored in a predictable location.
- 13-17: Adding a check for the successful copying of the provisioning profile enhances the script's reliability by providing immediate feedback on the operation's success or failure.
ios/install_dist_profile.sh
Outdated
else | ||
echo "Error: Provisioning profile copy failed." | ||
fi | ||
|
||
# clean | ||
rm -fr *.mobileprovision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When cleaning up provisioning profiles, it's safer to specify the glob pattern more explicitly to avoid unintended deletions, especially in scripts that might be run in different environments.
- rm -fr *.mobileprovision
+ rm -fr ./*.mobileprovision
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
rm -fr *.mobileprovision | |
rm -fr ./*.mobileprovision |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- .github/workflows/ios_deploy.yml (3 hunks)
- ios/Runner/ExportOptions.plist (1 hunks)
- ios/install_dist_profile.sh (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ios_deploy.yml
Additional comments: 3
ios/Runner/ExportOptions.plist (1)
- 10-10: The update to the provisioning profile UUID appears correct. Please ensure the UUID
c0babb80-a073-45d8-aefa-4021ef3fdb9b
matches the intended provisioning profile forcom.canopas.projectunity
.ios/install_dist_profile.sh (2)
- 8-8: Creating a dedicated directory for provisioning profiles is a good practice. This ensures that the profiles are organized and easily accessible.
- 13-18: Adding a check for successful profile copying and providing an error message if the copy fails enhances the script's reliability and user feedback. Good job implementing robust error handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/ios_deploy.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ios_deploy.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/ios_deploy.yml (4 hunks)
- ios/install_dist_profile.sh (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ios_deploy.yml
Additional comments: 2
ios/install_dist_profile.sh (2)
- 8-8: Creating a dedicated directory for provisioning profiles is a good practice for organization and ensures that the profiles are stored in a predictable location.
- 13-20: Adding a check for successful profile copying and providing clear error messages enhances the script's reliability and user experience. This is a good practice for error handling.
@@ -3,10 +3,21 @@ | |||
DIST_PROFILE_FILE=${DIST_PROVISION_UUID}.mobileprovision | |||
|
|||
# Recreate the certificate from the secure environment variable | |||
echo $DIST_PROVISION | base64 --decode > $DIST_PROFILE_FILE | |||
echo $BUILD_PROVISION_PROFILE_BASE64 | base64 --decode > $DIST_PROFILE_FILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command uses an environment variable without double quotes. This could lead to globbing and word splitting issues.
- echo $BUILD_PROVISION_PROFILE_BASE64 | base64 --decode > $DIST_PROFILE_FILE
+ echo "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode > "$DIST_PROFILE_FILE"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
echo $BUILD_PROVISION_PROFILE_BASE64 | base64 --decode > $DIST_PROFILE_FILE | |
echo "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode > "$DIST_PROFILE_FILE" |
echo $DIST_PROVISION | base64 --decode > $DIST_PROFILE_FILE | ||
echo $BUILD_PROVISION_PROFILE_BASE64 | base64 --decode > $DIST_PROFILE_FILE | ||
|
||
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles" | ||
|
||
# copy where Xcode can find it | ||
cp ${DIST_PROFILE_FILE} "$HOME/Library/MobileDevice/Provisioning Profiles/${DIST_PROVISION_UUID}.mobileprovision" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cp
command should use double quotes around variables to prevent globbing and word splitting.
- cp ${DIST_PROFILE_FILE} "$HOME/Library/MobileDevice/Provisioning Profiles/${DIST_PROVISION_UUID}.mobileprovision"
+ cp "${DIST_PROFILE_FILE}" "$HOME/Library/MobileDevice/Provisioning Profiles/${DIST_PROVISION_UUID}.mobileprovision"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
cp ${DIST_PROFILE_FILE} "$HOME/Library/MobileDevice/Provisioning Profiles/${DIST_PROVISION_UUID}.mobileprovision" | |
cp "${DIST_PROFILE_FILE}" "$HOME/Library/MobileDevice/Provisioning Profiles/${DIST_PROVISION_UUID}.mobileprovision" |
ios/install_dist_profile.sh
Outdated
else | ||
echo "Error: Provisioning profile copy failed." | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When cleaning up provisioning profiles, it's safer to specify the glob pattern more explicitly to avoid unintended deletions, especially in scripts that might be run in different environments.
- rm -fr *.mobileprovision
+ rm -fr ./*.mobileprovision
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
rm -fr ./*.mobileprovision |
c04cb5d
to
91c506d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/ios_deploy.yml (3 hunks)
- ios/install_dist_profile.sh (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ios_deploy.yml
Additional comments: 4
ios/install_dist_profile.sh (4)
- 6-6: Echo command should use double quotes around variables to prevent globbing and word splitting. This change was previously suggested and remains valid.
- 8-8: Creating a dedicated directory for provisioning profiles is a good practice for organization and avoids potential conflicts. This change enhances the script's maintainability.
- 11-11: The
cp
command should use double quotes around variables to prevent globbing and word splitting. This change was previously suggested and remains valid.- 3-11: > 📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [14-14]
When cleaning up provisioning profiles, it's safer to specify the glob pattern more explicitly to avoid unintended deletions. This change was previously suggested and remains valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- .github/workflows/ios_deploy.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ios_deploy.yml
Purpose
Summary of Changes
Test steps
Conformity
Visual Evidence (Video, Images or Gif)
Summary by CodeRabbit