Feature: Allow for cli version specification - #253
Open
Dominik Ondusko (Olgethorpe) wants to merge 5 commits into
Open
Feature: Allow for cli version specification#253Dominik Ondusko (Olgethorpe) wants to merge 5 commits into
Dominik Ondusko (Olgethorpe) wants to merge 5 commits into
Conversation
Dominik Ondusko (Olgethorpe)
requested review from
a team and
Stuart Leeks (stuartleeks)
as code owners
July 27, 2023 21:07
Dominik Ondusko (Olgethorpe)
requested a review
from Kenneth Redler (kennethredler)
July 28, 2023 13:19
Author
|
@microsoft-github-policy-service agree company="M Science LLC" |
Christof Marti (chrmarti)
requested changes
Dec 13, 2023
Christof Marti (chrmarti)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the PR! I have left a few comments. Could you take a look and address them. Thanks!
| }); | ||
| return exitCode === 0; | ||
| const {exitCode, stdout} = await exec(getSpecCliInfo().command, ['--version'], {}); | ||
| return exitCode === 0 && stdout === cliVersion; |
Collaborator
There was a problem hiding this comment.
Could stdout include a newline? Maybe use .trim() on the string.
There was a problem hiding this comment.
Good point, I have addressed the change.
Christof Marti (chrmarti)
requested changes
Feb 7, 2025
Christof Marti (chrmarti)
left a comment
Collaborator
There was a problem hiding this comment.
Sorry, long delay, but this would still be useful. Left a few more questions.
| description: Builds the image with `--no-cache` (takes precedence over `cacheFrom`) | ||
| cliVersion: | ||
| required: false | ||
| default: latest |
Collaborator
There was a problem hiding this comment.
Is the default now 0?
| }); | ||
| return exitCode === 0; | ||
| const {exitCode, stdout} = await exec(command, ['--version'], {}); | ||
| return exitCode === 0 && stdout.trim() === cliVersion; |
Collaborator
There was a problem hiding this comment.
=== won't match, e.g., major version 0 with any actual x.y.z version. 🤔
| import {findWindowsExecutable} from './windows'; | ||
|
|
||
| const cliVersion = "0"; // Use 'latest' to get latest CLI version, or pin to specific version e.g. '0.14.1' if required | ||
| export const MAJOR_VERSION_FALLBACK = '0'; |
Collaborator
There was a problem hiding this comment.
nit: Use camelCase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is in the context of devcontainers/cli#606.
I think this should be enough to allow for CLI version specification according to the other code I saw while reading through this.
The local build in the devcontainer is passing.