Skip to content

Comments

Check that CLI is at least specified min version#2832

Merged
sukantoraymond merged 9 commits intomainfrom
cli-min-version
Jun 6, 2025
Merged

Check that CLI is at least specified min version#2832
sukantoraymond merged 9 commits intomainfrom
cli-min-version

Conversation

@sukantoraymond
Copy link
Contributor

@sukantoraymond sukantoraymond commented Jun 5, 2025

When CLI has higher min version specified

AVL-7H2W7V:avalanche-cli raymondsukanto$ ./bin/avalanche blockchain
Error: CLI version is required to be at least v1.8.11, current CLI version is v1.8.10, please upgrade CLI by calling `curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh | sh -s`

This is required because if we update our schema for dependency versioning, CLI will need to know how to process these changes to function.

Signed-off-by: sukantoraymond <rsukanto@umich.edu>
Signed-off-by: sukantoraymond <rsukanto@umich.edu>

versionComparison := semver.Compare(version, minVersion)
if versionComparison == -1 {
return fmt.Errorf("CLI version is required to be at least %s, current CLI version is %s, please upgrade CLI by calling `curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh | sh -s`", minVersion, version)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add avalanche update to the upgrade instructions?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this as the first option, and the curl as second one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addreessed

@sukantoraymond sukantoraymond merged commit f384bd5 into main Jun 6, 2025
7 of 50 checks passed
@sukantoraymond sukantoraymond deleted the cli-min-version branch June 6, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants