Repository navigation
feat: add version parameter to install scripts - #323
Conversation
Allow users to specify which version to install via -Version parameter. Accepts semantic versions with or without 'v' prefix, or 'latest'. Defaults to 'latest' for backward compatibility.
Check APP_VERSION environment variable as fallback before defaulting to 'latest'. Priority: -Version parameter > APP_VERSION env var > 'latest'.
Simplify version handling by accepting only the -Version parameter. Removed APP_VERSION environment variable fallback for clarity.
Allow users to specify which version to install via --version parameter. Accepts semantic versions with or without 'v' prefix, or 'latest'. Defaults to 'latest' for backward compatibility.
- Add version format validation (semantic version or 'latest') - Fix variable quoting in test conditions - Reject empty version strings with helpful error - Combine version processing into single block
Replace contradictory nested conditions with single check that properly rejects both missing and empty version arguments.
amoeba
left a comment
There was a problem hiding this comment.
The idea makes sense but I'm not sure what the rationale is. And I'm not sure we want to advertise that users install non-latest versions of dbc ever.
|
It's needed for consistency with a github action. Users need to be able to pin installing a specific version, even from these scripts. (this functionality would already be available via uv/pip install etc. which could pin a specific version of the CLI to install) |
amoeba
left a comment
There was a problem hiding this comment.
In that case, I think it'd be better to not mention this in the README or docs. Also left one note.
Co-authored-by: Bryce Mecum <[email protected]>
|
@amoeba i've removed the changes to the docs as requested. |
|
I think it's minor since this isn't exposed to users now but I get this error which could confuse people if they use the setup-dbc action: $ sh scripts/install.sh --version 0.1.1
Downloading dbc (0.1.1) for aarch64-apple-darwin
Error: dbc is not available for your platform. Please create an issue at https://github.com/columnar-tech/dbc/issues or contact [email protected] for assistance. |
Co-authored-by: Bryce Mecum <[email protected]>
|
ah, change the error to specify there's no matching version for the platform instead? |
|
Have any suggested wording to use instead @amoeba ? |
|
Yeah, error saying the version requested isn't a valid version to request. I can imagine someone putting the wrong version in their action and erroring about platforms might sense them off on wild goose chase. I think it's hard for us to have separate error detection for version and also platform. At least without changing things on the AWS side. So could we just update the existing error to say,
|
|
@amoeba updated the error message string |
## Summary Adds version parameter support to both Windows and Unix install scripts, allowing users to install specific versions of dbc instead of always defaulting to 'latest'. ## Changes ### Windows PowerShell Script (`scripts/install.ps1`) - Added `-Version` parameter to specify version (e.g., `0.2.0`, `v0.2.0`, or `latest`) - Automatic normalization strips 'v'/'V' prefix from version strings - Defaults to `'latest'` for backward compatibility - Updated script help documentation ### Bash Script (`scripts/install.sh`) - Added `--version` parameter to specify version (long form only to avoid conflict with `-v` verbose flag) - Automatic normalization strips 'v'/'V' prefix from version strings - Version format validation (semantic version or 'latest') - Rejects empty/invalid versions with helpful error messages - Defaults to `'latest'` for backward compatibility - Updated help documentation with examples - POSIX shell compliant ### Documentation - Added version parameter examples to `docs/getting_started/installation.md` - Added version parameter examples to `README.md` - Shows download-then-run approach for Windows version-specific installs ## Usage Examples **Windows:** ```powershell # Default (latest) .\install.ps1 # Specific version .\install.ps1 -Version "0.2.0" # With v prefix .\install.ps1 -Version "v0.2.0" ``` **Linux/macOS:** ```bash # Default (latest) ./install.sh # Specific version ./install.sh --version 0.2.0 # With v prefix ./install.sh --version v0.2.0 ``` ## Testing - ✅ Backward compatibility maintained (defaults to 'latest') - ✅ Version normalization works across all formats - ✅ Windows script help displays correctly - ✅ Bash script version validation works - ✅ POSIX shell compliance verified - ✅ Documentation examples are accurate ## Commits - feat: add -Version parameter to Windows install script - docs: add examples for version parameter in Windows install - feat: add APP_VERSION environment variable support - refactor: remove APP_VERSION env var, keep only -Version param - feat: add --version parameter to bash install script - fix: improve version parameter validation and quoting - fix: correct empty version string validation logic --------- Co-authored-by: Bryce Mecum <[email protected]>
Summary
Adds version parameter support to both Windows and Unix install scripts, allowing users to install specific versions of dbc instead of always defaulting to 'latest'.
Changes
Windows PowerShell Script (
scripts/install.ps1)-Versionparameter to specify version (e.g.,0.2.0,v0.2.0, orlatest)'latest'for backward compatibilityBash Script (
scripts/install.sh)--versionparameter to specify version (long form only to avoid conflict with-vverbose flag)'latest'for backward compatibilityDocumentation
docs/getting_started/installation.mdREADME.mdUsage Examples
Windows:
Linux/macOS:
Testing
Commits