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 <petridish@gmail.com>
|
@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 support@columnar.tech for assistance. |
Co-authored-by: Bryce Mecum <petridish@gmail.com>
|
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)-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