-
-
Notifications
You must be signed in to change notification settings - Fork 235
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 Clean.sh issue across projects (#9297) #9298
Fix Clean.sh issue across projects (#9297) #9298
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes involve modifications to several Changes
Assessment against linked issues
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 4
🧹 Outside diff range and nitpick comments (2)
src/Clean.sh (1)
1-23
: Consider adding additional safety featuresTo make the script more robust and user-friendly:
- Add a confirmation prompt before proceeding with deletions
- Add error handling
- Add a dry-run option
Here's a sample implementation of these features:
#!/bin/bash set -euo pipefail # Script configuration DRY_RUN=false # Parse command line arguments while [[ $# -gt 0 ]]; do case $1 in --dry-run) DRY_RUN=true shift ;; esac done # Confirmation prompt if [[ "$DRY_RUN" = false ]]; then read -p "This will delete build artifacts and temporary files. Are you sure? (y/N) " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then echo "Operation cancelled." exit 1 fi fi🧰 Tools
🪛 Shellcheck
[warning] 8-8: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 13-13: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 18-18: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunProjectPage.razor (1)
99-101
: LGTM! Consider adding context about why this step is necessary.The instruction is well-placed within the Docker setup section and properly formatted. To make it more helpful for developers, consider adding a brief explanation of why this step is necessary for Windows users specifically.
<br /> -If you're developing on Windows, it is recommended to run <b><i>bash ./Clean.sh</i></b> the first time you open the project in a container. +If you're developing on Windows, it is recommended to run <b><i>bash ./Clean.sh</i></b> the first time you open the project in a container to ensure proper line endings and file permissions. <br />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (5)
src/BlazorUI/Clean.sh
(1 hunks)src/Clean.sh
(1 hunks)src/Templates/BlazorEmpty/Bit.BlazorEmpty/Clean.sh
(1 hunks)src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json
(1 hunks)src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates06RunProjectPage.razor
(1 hunks)
🧰 Additional context used
🪛 Shellcheck
src/BlazorUI/Clean.sh
[warning] 8-8: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 13-13: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 18-18: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
src/Clean.sh
[warning] 8-8: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 13-13: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 18-18: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
src/Templates/BlazorEmpty/Bit.BlazorEmpty/Clean.sh
[warning] 8-8: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 13-13: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
[warning] 18-18: For loops over find output are fragile. Use find -exec or a while read loop.
(SC2044)
🔇 Additional comments (3)
src/Clean.sh (1)
3-5
: LGTM! Clear and concise comments.
The updated comments effectively communicate the script's purpose and prerequisites.
src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json (2)
362-363
: LGTM: Shell script inclusion addresses the Clean.sh corruption issue.
The addition of "**/*.sh"
to the copyOnly
array ensures that shell scripts, including Clean.sh, are properly included in the template. This change directly addresses the corruption issue mentioned in #9297.
Line range hint 1-585
: Verify database and storage configuration documentation.
The AI summary indicates new options were added for file storage (AzureBlobStorage
, Other
) and database (Other
). While these additions enhance flexibility, please ensure that:
- The documentation is updated to cover these new options
- Any necessary configuration examples are provided for the "Other" options
This closes #9297
Summary by CodeRabbit
Release Notes
New Features
Improvements
These updates improve user experience and flexibility in project configuration.