-
Notifications
You must be signed in to change notification settings - Fork 1.8k
gen-csv should find out the latest CSV version #2267
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
Comments
I am not sure if I follow up properly the feature request here. Would you like to run
The version.go is not necessarily the same version of CSV. Note that the tags of CSV not necessarily will be or follow up the project tags as well. |
I am more interested in that cli sets from version automatically.
…On Tue, Nov 26, 2019, 3:28 PM Camila Macedo ***@***.***> wrote:
I am not sure if I follow up properly the feature request here.
Would you like to run operator-sdk olm-catalog gen-csv and then it
automatically set the from and the new version following up semver? Am I
right?
I think finding out the new version is kind of easy with Bash scripts (we
have a version.go file which can be read by the script).
The version.go is not necessarily the same version of CSV. Note that the
tags of CSV not necessarily will be or follow up the project tags as well.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2267?email_source=notifications&email_token=AAC37HHCIA75FQKUNZDUKYDQVUI5NA5CNFSM4JRP2OE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFF2U6Q#issuecomment-558606970>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC37HE3HEOTLYCPK6XLORTQVUI5NANCNFSM4JRP2OEQ>
.
|
Sorry, it still not clear for me. Could you please exemplify as for example?
|
Ok, will do that when I get home
…On Tue, Nov 26, 2019, 3:35 PM Camila Macedo ***@***.***> wrote:
It still not clear for me. Could you please exemplify as for example?
- For the example in the first comment of this issue; I'd like to run
the command x
- Then, I would expect the result X.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2267?email_source=notifications&email_token=AAC37HF4A6JT3XERENG4SD3QVUJ2TA5CNFSM4JRP2OE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFF3HTI#issuecomment-558609357>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC37HGQFZBIP2EDYCP5ZE3QVUJ2TANCNFSM4JRP2OEQ>
.
|
@camilamacedo86 Updated the issue description. Let me know if you need further clarification. |
Hi @aliok, Yes, it is clear enough now. Really thank you for the clarifications. |
I was planning to give it a try already :) |
Hi @joelanford, @hasbro17 and @estroz, WDYT? It shows reasonable for me but low priority. It would be adding new flag as for example |
@aliok you can sort by semantic version with GNU $ echo -e "0.1.0\n0.2.0\n3.0.0\n0.0.5\n0.0.12" | sort -V
0.0.5
0.0.12
0.1.0
0.2.0
3.0.0 You can do something like: $ find deploy/olm-catalog/operator-name/* -maxdepth 1 -type d -exec basename {} \; | sort -V | tail -1 to get the latest version. Does that solve your issue? |
hi @estroz I would still prefer the hypothetical |
@aliok sounds good. I'll let a few others comment on this, and if we find its a feature we want in One goal of the SDK is to have a low-complexity CLI, so we strive to keep the number of flags to a minimum, especially when there are 1-2 line bash wrappers that give you the same functionality of 10+ lines of Go code. This is the main reason why I hesitate to ok this right now, not that it isn't a useful feature. |
Hi @aliok, After @estroz solution in #2267 (comment) it shows that could be solved by creating a Makefile target with. In this way, it is the same scenario of #1600 (comment) and then, I am afraid that we should NOT move forward with. As an example of a similar scenario that was decided not to move forward was well see #1964 (comment). So, I am closing this one since a solution was already provided and it can be done by customizations in the Makefile. However, please, feel free to re-open if you think that it still required. c/c @estroz |
Feature Request
Is your feature request related to a problem? Please describe.
Assume this tree:
and assume I want to generate the CSV for version
0.11.0
.Currently I have to do this:
I have to find out the
from-version
myself and feed it tooperator-sdk olm-catalog gen-csv
, which is not easy (details at the bottom).Describe the solution you'd like
I would like to have a call like this:
and operator-sdk should figure out the
--from-version
for me.--from-latest-version
(just made it up) is the important thing here! I suggest creating a flag like that.Outcome would be:
Additional info
In our project, we want to call
gen-csv
subcommand with a Bash script.However, finding out the previous version and passing it as
--from-version
is hard with Bash. That is because of semver complexities. For example,0.10.0
is a greater version than0.9.0
, but not when you simply sort nested directory names. So, alphabetic sorting won't work.However, if the CLI would do that for me, that would be great! CLI could simply use https://github.com/coreos/go-semver.
The text was updated successfully, but these errors were encountered: