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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure cli using latest version from the supported_cli_versions.json #1992

Merged
merged 4 commits into from Jan 20, 2023

Conversation

tjgurwara99
Copy link
Member

@tjgurwara99 tjgurwara99 commented Jan 20, 2023

closes this issue

The PR changes the bump-cli workflow to only edit the supported_cli_versions.json file and remove the need to edit ensureCli.ts which used to include a hardcoded string of the latest version. Now however, it takes the latest version from the supported_cli_versions.json (the first version in the array in supported_cli_versions.json is always going to be the latest version of the supported cli by design) removing the need to update the ensureCli.ts file 馃槃

@tjgurwara99 tjgurwara99 marked this pull request as ready for review January 20, 2023 11:36
@tjgurwara99 tjgurwara99 requested a review from a team as a code owner January 20, 2023 11:36
Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

The main workflow also need an update:

run: echo "cli-versions=$(cat ./supported_cli_versions.json | jq -rc)" >> $GITHUB_OUTPUT

Otherwise, LGTM with just some minor comments! (I tried running the CLI tests locally too, and all good 馃帀 )

// CLI version to test. Hard code the latest as default. And be sure
// to update the env if it is not otherwise set.
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor suggestion to make the comment clearer. Something like this?

Suggested change
// CLI version to test. Hard code the latest as default. And be sure
// to update the env if it is not otherwise set.
// CLI version to test. Use the latest supported version by default.
// And be sure to update the env if it is not otherwise set.

@@ -38,7 +39,7 @@ const _10MB = _1MB * 10;

// CLI version to test. Hard code the latest as default. And be sure
// to update the env if it is not otherwise set.
const CLI_VERSION = process.env.CLI_VERSION || "v2.11.6";
const CLI_VERSION = process.env.CLI_VERSION || data[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: we could make this variable name more descriptive 馃槃

Suggested change
const CLI_VERSION = process.env.CLI_VERSION || data[0];
const CLI_VERSION = process.env.CLI_VERSION || supportedCliVersions[0];

Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

LGTM

@shati-patel shati-patel merged commit c7f72c5 into main Jan 20, 2023
25 checks passed
@shati-patel shati-patel deleted the ensureCli-using-latest-version branch January 20, 2023 17:13
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.

None yet

3 participants