-
Notifications
You must be signed in to change notification settings - Fork 40
Parameterize #859
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
Parameterize #859
Conversation
- Add CHAT_BINARY_BRANCH and CLI_BINARY_NAME_MINIMAL to const.py - Import CHAT_BINARY_BRANCH and TAURI_PRODUCT_NAME in build.py - Replace hardcoded 'qchat' with CHAT_BINARY_NAME constant - Replace hardcoded 'q_desktop' with TAURI_PRODUCT_NAME constant - Replace hardcoded 'q_cli' with CLI_PACKAGE_NAME constant - Replace hardcoded 'prod' with CHAT_BINARY_BRANCH constant - Update comments to use generic binary name placeholders 🤖 Assisted by Amazon Q Developer
- Import APP_NAME, CLI_BINARY_NAME, PTY_BINARY_NAME, CHAT_BINARY_NAME - Replace hardcoded 'Amazon Q.app' with f-string using APP_NAME - Replace hardcoded binary paths and identifiers with constants 🤖 Assisted by Amazon Q Developer
- Replace hardcoded 'qchat' in comments with {chat_binary} placeholder
- Add REBRANDING_GUIDE.md to .gitignore
🤖 Assisted by Amazon Q Developer
- Replace 'qchat binary' with 'chat binary' in argparse description - Remove REBRANDING_GUIDE.md from .gitignore (moved to .git/info/exclude) 🤖 Assisted by Amazon Q Developer
- Import CHAT_BINARY_NAME in chat-cli/src/logging.rs - Import CHAT_BINARY_NAME in fig_log/src/lib.rs - Import CHAT_BINARY_NAME in chat-cli/src/cli/mod.rs - Replace hardcoded 'qchat.log' with format string using CHAT_BINARY_NAME 🤖 Assisted by Amazon Q Developer
- Add CLI_BINARY_NAME, CHAT_BINARY_NAME, PTY_BINARY_NAME variables to bundle/linux/install.sh - Replace hardcoded binary names with variables in install commands - Add DESKTOP_BINARY_NAME variable to scripts/install.sh - Replace hardcoded 'q_desktop' with DESKTOP_BINARY_NAME variable 🤖 Assisted by Amazon Q Developer
- Add SC2329 to bash-preexec.sh __bp_adjust_histcontrol function - Add SC2329 disable before override function in shell integration generator - Add cfg_attr to suppress dead_code warning on Windows for list_profiles_blocking - Regenerate test snapshots with updated shellcheck directives SC2329 warns about functions defined after being called, which is intentional in our bash-preexec override pattern. 🤖 Assisted by Amazon Q Developer
| # BUILD_BUCKET/prod/latest/{target}/qchat.zip | ||
| # BUILD_BUCKET/{CHAT_BINARY_BRANCH}/latest/{target}/{CHAT_BINARY_NAME}.zip |
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.
thanks for doing the branch as well !!
|
|
||
| APP_NAME = "Amazon Q" | ||
| CLI_BINARY_NAME = "q" | ||
| CLI_BINARY_NAME_MINIMAL = "q-minimal" |
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.
nit: I didn't find this variable being used anywhere, Follow up CRs ?
| BINARY_NAME="q" | ||
| CLI_NAME="Q CLI" | ||
| COMMAND_NAME="q" | ||
| DESKTOP_BINARY_NAME="q_desktop" |
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 see two shell scripts, but if changes are to be need in few more. May be we create constants.sh and just do importing that on these scripts
Summary
Parameterize hardcoded binary names and product names throughout the codebase by replacing hardcoded strings with constants defined in central configuration files.
Changes
Python Build Scripts
build-scripts/const.py: AddedCHAT_BINARY_BRANCHandCLI_BINARY_NAME_MINIMALconstantsbuild-scripts/build.py: Replaced hardcoded "qchat", "q_desktop", "q_cli", "prod" with constantsbuild-scripts/manifest.py: Replaced hardcoded "Amazon Q.app", binary paths, and identifiers with constantsbuild-scripts/qchatbuild.py: Updated comments to use generic placeholdersbuild-scripts/qchatmain.py: Updated description to be genericRust Codebase
crates/chat-cli/src/logging.rs: Replaced hardcoded "qchat.log" withCHAT_BINARY_NAMEconstantcrates/fig_log/src/lib.rs: Replaced hardcoded "qchat.log" withCHAT_BINARY_NAMEconstantcrates/chat-cli/src/cli/mod.rs: Replaced hardcoded "qchat.log" withCHAT_BINARY_NAMEconstantTesting
cargo +nightly fmt