Add CLI versions to workspace Cargo.toml and Solana check scripts #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the CLI versions of Solana and (optionally) Anchor to the workspace
Cargo.toml
to provide a single place that dictates which CLI versions should be used for the project, whether we are in CI or in a local environment. For instance:Since we know have a single point to access these versions, CI has been updated to use this information as well.
Additionally, two new scripts have been added to ensure the correct Solana version is used for the project:
pnpm solana:check
will check the installed Solana version and the one expected by the project. If they are different, the script will log a warning to let the user know. This check has been added before any existing script that uses the Solana CLI so the user can be aware that their local Solana version does not match the project requirements.pnpm solana:link
will also check the install Solana version against the expected one but in a more useful way. If they don't match, it'll check to see if the required version exists. If it does, it'll update the active release to point to that one. Otherwise, it will offer to download this version for you.