Add version methods
What does this MR do?
Add utility versions to interact with GitLab versions. Versions are fetched from two sources:
-
versions.gitlab.com
=> Used to interact with previous GitLab versions -
releases.yml
=> Used to interact with upcoming GitLab releases
In this commit, three methods were added:
-
active_version
- To return the GitLab active version -
current_version
- To return the GitLab current version -
next_versions
- That returns the GitLab next patchable versions
Also execute
was renamed to upcoming_releases
10:18:26 ❯ export PRODUCTION_TOKEN=glpat-123
10:18:27 ❯ irb
3.2.2 :001 > require 'release_dates'
=> true
3.2.2 :002 > release_dates = ReleaseDates
=> ReleaseDates
3.2.2 :003 > release_dates.upcoming_releases
=>
{"16.2"=>"2023-07-22",
"16.3"=>"2023-08-22",
"16.4"=>"2023-09-22",
"16.5"=>"2023-10-22",
"16.6"=>"2023-11-16",
"16.7"=>"2023-12-21",
"16.8"=>"2024-01-18",
"16.9"=>"2024-02-15",
"16.10"=>"2024-03-21",
"16.11"=>"2024-04-18",
"17.0"=>"2024-05-16",
"17.1"=>"2024-06-20",
"17.2"=>"2024-07-18"}
3.2.2 :005 > release_dates.active_version
=> "16.3"
3.2.2 :006 > release_dates.current_version
=> "16.2"
3.2.2 :007 > release_dates.next_versions
=> ["16.2.5", "16.1.5", "16.0.9"]
Edited by Mayra Cabrera