feat(catalog): add Google Cloud CLI and Google Workspace CLI#43
feat(catalog): add Google Cloud CLI and Google Workspace CLI#43
Conversation
Add gcloud (Google Cloud SDK) and google-workspace-cli (googleworkspace/cli) to the tool catalog under the platform category. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Summary of ChangesHello, 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 expands the available command-line interface tools within the catalog by integrating two new Google-specific utilities. It introduces the Google Cloud CLI for managing cloud resources and the Google Workspace CLI for interacting with Workspace services, enhancing the platform's utility for users working with Google's ecosystem. Highlights
Changelog
Activity
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.
Code Review
This pull request adds catalog entries for gcloud and google-workspace-cli. The changes are a good addition, but there are a few issues to address for correctness and consistency. For gcloud, the install_method should be set to manual to align with the documented schema for tools with external installers. For google-workspace-cli, the binary_name is incorrect, which will prevent the tool from being detected, and there's an extraneous auto_update field. I've provided suggestions to fix these issues.
Note: Security Review has been skipped due to the limited scope of the PR.
- gcloud: change install_method from custom_installer to manual - google-workspace-cli: fix binary_name to gws, remove auto_update Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
The install_method must match an existing installer script. Create gcloud_installer.sh following the aws_installer.sh pattern: fresh installs via sdk.cloud.google.com, updates via gcloud components update. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
The github_release_binary installer requires a download_url_template. Add the template matching the gws release asset naming convention. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
tree -v means verbose listing, not version. The generic version detection tries -v first, which outputs a directory listing where filenames like "codex.sqlite3.before-v1.9.1.bak" match the version regex, causing incorrect version detection. Specifying --version skips the -v probe. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Replace ${GOPATH} expansion with a go_bin strategy that:
- On update: keeps the binary where it currently is (respects gup)
- On fresh install: best-guesses Go bin folder via GOPATH env,
`go env GOPATH`, or ~/go/bin fallback (no Go runtime required)
Apply to golangci-lint and gosec to avoid duplicate installations
in both ~/.local/bin and ~/go/bin.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
719d4d9 to
d4e2302
Compare
The go1.XX symlink (e.g. go1.25 -> go1.25.8) was only created when it didn't exist. On patch upgrades the stale symlink was preserved, so go1.25 still pointed at go1.25.7 after installing go1.25.8, causing the upgrade to appear failed (version unchanged). Change the condition from [ ! -e ] to unconditional ln -sf. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
- Add ~/google-cloud-sdk/bin to PATH at script start so existing installs are detected even when not in shell PATH - Three-way check: gcloud in PATH → update, SDK dir exists → recover, neither → fresh install (avoids "directory already exists" error) - Fresh install uses direct tarball + install.sh --quiet instead of the noisy sdk.cloud.google.com wrapper script - Pipe update output through tail -1 to reduce noise Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Symlink SDK binaries into ~/.local/bin so gcloud is available without needing ~/google-cloud-sdk/bin in PATH. Follows the same convention as all other tools in the catalog. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Category reflects tool purpose, not implementation language. target_dir: go_bin is sufficient for correct install path. Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de> Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Summary
New tools
gcloud_installer.shwith quiet install,gcloud components updatefor upgrades, symlinksgcloud/gsutil/bqinto user bingwsbinary via GitHub release tarballsgo_bin(gup-managed)Bug fixes
tree -vmeans verbose listing, not version — a filenamecodex.sqlite3.before-v1.9.1.bakmatched the version regex, returning1.9.1instead of2.3.1. Fixed by addingversion_flag: "--version"to cataloggo1.25/go1.26symlinks were only created on first install, never updated on patch upgrades. Changed from[ ! -e ]to unconditionalln -sfNew feature:
go_bintarget_dirPer-tool
target_dircatalog field withgo_binstrategy:$GOPATH→go env GOPATH→~/go/binfallback (no Go runtime required)golangci-lint,gosec, andvhsTest plan
~/go/bin/go_binresolves to~/go/binfor existing and fresh installs