-
Notifications
You must be signed in to change notification settings - Fork 28
allow :latest when specifying image tag #627
Conversation
":latest" image tag
@@ -138,7 +138,7 @@ const generateDebug = (port, useDebug) => (useDebug ? `--inspect=0.0.0.0:${port} | |||
// So we have to remove those flags if the one-app version is less than 5.13.0 | |||
// 5.13.0 is when node 16 was introduced. | |||
const generateNodeFlags = (appVersion) => { | |||
if (semver.intersects(appVersion, '^5.13.0', { includePrerelease: true })) { | |||
if (appVersion === 'latest' ? true : semver.intersects(appVersion, '^5.13.0', { includePrerelease: true })) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (appVersion === 'latest' ? true : semver.intersects(appVersion, '^5.13.0', { includePrerelease: true })) { | |
if (appVersion === 'latest' || semver.intersects(appVersion, '^5.13.0', { includePrerelease: true })) { |
We could avoid the ternary, but its not a blocker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Jamie King <[email protected]>
@agorskiy12 Can you also test for when |
…ress/one-app-cli into fix/allow-latest-tag
OK I'll check for that. are you saying we should ONLY be adding flags for versions >=6.6.0 ? Could you elaborate why? right now we're allowing anything after 5.13.0 |
|
OK i see. I also see why something like 6.6.0 wouldnt work - caret ^ means any version compatible, but anything with 6 will not "intersect" because theres a major version change from 5. we will have to use something like semver.gte (greater than). |
allow to use :latest when specifying image tag
Provide a general summary of your changes in the Title above.
Description
:latest should be allowed when specifying image tag
Types of changes
Check boxes that apply:
Checklist
Check boxes that apply: