Skip to content

Fix check analyzer version regex

Adam Cohen requested to merge fix-check-analyzer-version-regex into master

What does this MR do?

This MR fixes a bug with the check analyzer version job that was introduced in Extract full version string when checking analy... (!312 - merged). This is necessary to fix this failing test.

See this comment for more details.

Behaviour of existing MRs compared to this MR:

MR Input Output Expected Correct?
Allow version check to match with more detailed... (!281 - merged) analyzer version 3.0.0 (go1.18.2 linux/amd64) 3.0.0 3.0.0
analyzer version 3.0.0-alpha1 3.0.0 3.0.0-alpha1
Extract full version string when checking analy... (!312 - merged) analyzer version 3.0.0-alpha1 3.0.0-alpha1 3.0.0-alpha1
analyzer version 3.0.0 (go1.18.2 linux/amd64) 3.0.0 (go1.18.2 linux/amd64) 3.0.0
This MR analyzer version 3.0.0-alpha1 3.0.0-alpha1 3.0.0-alpha1
analyzer version 3.0.0 (go1.18.2 linux/amd64) 3.0.0 3.0.0

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

  • Tests added for this feature/bug

    • Tested manually:

      docker run -it --rm docker:20.10 sh
      
      / # echo "analyzer version 3.0.0-alpha1" | sed -E -n -e 's/^\S+ \S+ (\d+\.\d+\.\d+\S*)\s*.*/\1/p'
      3.0.0-alpha1
      
      / # echo "analyzer version 3.0.0 (go1.18.2 linux/amd64)" | sed -E -n -e 's/^\S+ \S+ (\d+\.\d+\.\d+\S*)\s*.*/\1/p'
      3.0.0
      
      / # echo "analyzer version 3.0.0-alpha1 (go1.18.2 linux/amd64)" | sed -E -n -e 's/^\S+ \S+ (\d+\.\d+\.\d+\S*)\s*.*/\1/p'
      3.0.0-alpha1
    • Tested successfully in this job

Edited by Adam Cohen

Merge request reports