-
Notifications
You must be signed in to change notification settings - Fork 141
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
feat: Add env vars for install
and bin
args
#566
feat: Add env vars for install
and bin
args
#566
Conversation
Resolves #562 * Add Env vars for custom binary path and custom install path * Add TOML config key for custom install path for consistency * Improve wording in resolved parameter values debugging output * Add tests for new Env vars and TOML config key * Documentation * Update https://tfswitch.warrensbox.com/usage/commandline/ accordingly * Update https://tfswitch.warrensbox.com/usage/config-files/ accordingly * Add `arch` and `log-level` TOML keys description to https://tfswitch.warrensbox.com/usage/config-files/ * Improve wording in some places
…or_install_and_bin_location
…nt()` for simplicity
…or simplicity (+ create generic mapping of params)
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.
Pull Request Overview
This PR adds support for new environment variables and TOML configuration keys (including custom install path and binary path) and updates related documentation, tests, and workflows for consistency. It also refactors environment variable and configuration parsing for simplicity while updating GitHub Actions workflows to derive the Go version from go.mod.
- Updates documentation for configuration files and command line usage with new environment variable examples.
- Adds tests for the new env vars and TOML key, and refactors parameter parsing logic.
- Updates GitHub Actions workflows to use go-version-file for Go version configuration.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
www/docs/usage/config-files.md | Updated wording and added details for using custom paths and log-levels. |
test-data/integration-tests/test_tfswitchtoml/.tfswitch.toml | Added install key for specifying a custom install path. |
lib/param_parsing/environment.go | Refactored environment variable parsing to iterate over paramMappings. |
www/docs/usage/commandline.md | Updated shell command examples and added new sections for TF_LOG_LEVEL, TF_INSTALL_PATH, and TF_BINARY_PATH. |
.github/workflows/* | Adjusted workflows to read Go version from go.mod and set minimal permissions. |
lib/param_parsing/parameters.go, toml.go, toml_test.go | Integrated new parameter mappings and fixed testing for TOML processing. |
lib/install.go | Minor update to log message for clarity on CPU architecture mismatches. |
…or_install_and_bin_location
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.
Will finish reviewing after work today
…e.md` as of the most recent commits that addressed PR comments
Resolves #561 (discussion)
Resolves #562 (issue from discussion)
arch
andlog-level
TOML keys description to https://tfswitch.warrensbox.com/usage/config-files/go.mod
instead of explicit hard-coded version