Skip to content
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

Add CLI versions to workspace Cargo.toml and Solana check scripts #75

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

lorisleiva
Copy link
Member

@lorisleiva lorisleiva commented Jul 25, 2024

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:

[workspace.metadata.cli]
anchor = "0.30.0"
solana = "1.18.18"

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.

Copy link

changeset-bot bot commented Jul 25, 2024

🦋 Changeset detected

Latest commit: c30ef4e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-solana-program Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@lorisleiva lorisleiva requested a review from febo July 25, 2024 13:03
@lorisleiva lorisleiva merged commit 4adf466 into main Jul 25, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Jul 25, 2024
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.

1 participant