Fix last tag detection in ci/version
What does this MR do?
Fixes the way how our pipeline scripting detects the last tag to generate the version number.
Why was this MR needed?
As noted at #6585 (comment 299913254), current script instead of detecting the most recent tag, detects the v9.5.0
one.
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Added tests for this feature/bug -
In case of conflicts with master
- branch was rebased