-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add homebrew automation scripts for macOS #48
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
Conversation
Provides automated scripts for updating, installing tools/languages/utilities, checking outdated packages, cleanup, and a minimal example to ensure safe dev environment management.
Summary of ChangesHello @bniladridas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a set of opinionated yet safe Homebrew automation scripts designed to significantly streamline the setup and maintenance of macOS development environments. By encapsulating common Homebrew commands into repeatable shell scripts, it aims to enhance efficiency, reduce manual effort, and ensure consistency in managing software packages, tools, and languages. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a helpful set of shell scripts for managing Homebrew. The scripts are well-structured and follow safe practices by using set -e. My review includes suggestions to further improve the scripts' efficiency and robustness. Specifically, I've recommended combining multiple brew install calls into a single command for better performance and updating the shell options to set -euo pipefail for stricter error handling. I also noted a redundant package installation. Overall, these are great additions to streamline the development environment setup.
| brew install go | ||
|
|
||
| # Package managers and tools | ||
| brew install npm |
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.
Installing npm separately when Node.js already includes it will cause conflicts. When brew install node is executed on line 15, npm is bundled with Node.js. Installing npm again on line 20 creates a duplicate installation that can lead to version mismatches, PATH conflicts, and unpredictable behavior where commands may use the wrong npm version.
Fix: Remove line 20 entirely:
# Remove this line:
brew install npmNode.js installation already provides npm, so this separate installation is both redundant and problematic.
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
bniladridas
left a comment
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.
I'll keep it concise.
harper-bot-glitch
left a comment
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.
It's up to date with origin and the working tree is clean.
Homebrew Scripts Collection
This PR adds a new
homebrew-scriptsdirectory containing safe shell scripts for common Homebrew operations. The scripts provide automated ways to manage packages without destructive actions, enhancing the dev environment setup process.Changes
update-brew.sh: Updates and upgrades Homebrew packages.install-common-tools.sh: Installs essential dev tools.cleanup-brew.sh: Cleans up old versions and unused dependencies.check-outdated.sh: Lists outdated packages.install-languages.sh: Installs additional programming languages.install-utilities.sh: Installs common CLI utilities.minimal-install.sh: Minimal example script with substantial commentary.README.md: Documentation for all scripts.All scripts are executable, linted, and follow safe practices. This aligns with the repo's focus on streamlining macOS development environments.