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.
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.
I used
[0-9]
because\d
is accepted only on Mac OS.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.
This would still match
3.1.0-SNAPSHOT
wouldn't it - was the idea not to match it?You could exclude "SNAPSHOT" matches but that might be just a band-aid.
You might need
[0-9]+
in each case to account for double-digit versions.\d
might work with-E
but not worth it.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.
Thanks . Yes. It matches SNAPSHOT, too.
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.
This is only grepping lines with version like string.
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.
Oh, just to be clear, what are you trying to match or not match here?
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.
In the script,
$(...)
merges two lines into one.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.
BTW, is the following working in
grep
on Mac?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.
It works but you need
-E
as that is 'extended' regex syntax, like many things. I think-E
is standard across GNU / BSD grep.OK if you tell me this works, then I'm missing something, but it seems like this grep does not exclude the line I think you are trying to exclude, unless you want to print only the matching version from that line, and that's
-o
I understand it's picking up "Falling" so I am assuming something needs to ignore this line or only extract the version.grep -v Falling
would just ignore that lineThere 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.
Thanks. BTW,
grep -v Falling
is not robust enough. If someone adds another warning output someday, this situation will repeat again.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.
I'll update to use
grep -E '[0-9]+\.[0-9]+\.[0-9]+'
.