gitlab-releases 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -31
- data/Gemfile +2 -2
- data/Gemfile.lock +23 -14
- data/README.md +6 -3
- data/lib/gitlab_releases/release_versions.rb +13 -0
- data/lib/gitlab_releases/version.rb +1 -1
- data/lib/gitlab_releases.rb +4 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f9a73b90b46892ca18e3a95eba76136dd3d1f55e8c0eec56a39068076b1e4b3
|
4
|
+
data.tar.gz: d82099b7bf7cd5d0761e8c5b538df4628d8e754127858a8e18d03d94fb03dbcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aefa80ca4044fee1975419c938eb174c326c0bbfd7b662c89af5f2d6695ad4affb94391fba49e74f90d375e68d26bb6878425e133b2837258f09d88ce09472a3
|
7
|
+
data.tar.gz: 8d13eaea034f5682daba9d8de01ca5d42bcdd921fdc93ca64b23b9037bb3c41fae759aaf7da3be4c7f58283c8657bf603fca34b066f0f5b70d12b3a589b77978
|
data/CHANGELOG.md
CHANGED
@@ -1,64 +1,73 @@
|
|
1
|
-
## [
|
1
|
+
## [Unreleased]
|
2
2
|
|
3
|
-
|
3
|
+
## [1.1.0] - 2025-03-04
|
4
4
|
|
5
|
-
|
5
|
+
- Add `latest_patch_for_version` method to retrieve the latest patch for a given minor version
|
6
6
|
|
7
|
-
|
7
|
+
## [1.0.1] - 2024-11-20
|
8
8
|
|
9
|
-
|
9
|
+
- Upgrade gitlab gem to 5.1
|
10
|
+
- Upgrade activesupport gem to 8.0
|
11
|
+
|
12
|
+
## [1.0.0] - 2024-07-04
|
13
|
+
|
14
|
+
- Upgrade Ruby to 3.3.1
|
15
|
+
- Upgrade gitlab gem to 4.20.1
|
16
|
+
- Add runbook for publishing new versions of this gem
|
17
|
+
|
18
|
+
## [0.2.9] - 2024-04-18
|
19
|
+
|
20
|
+
- Fixes `ReleaseCalculator` class to consider major milestones.
|
21
|
+
|
22
|
+
## [0.2.8]
|
10
23
|
|
11
24
|
- Yanked version
|
12
25
|
|
13
|
-
## [0.
|
26
|
+
## [0.2.7] - 2024-03-06
|
14
27
|
|
15
|
-
- `
|
28
|
+
- Add `next_patch_release_date` method to return the next best-effort date for patch releases
|
16
29
|
|
17
|
-
## [0.2.
|
30
|
+
## [0.2.6] - 2024-02-22
|
18
31
|
|
19
|
-
-
|
20
|
-
- PRODUCTION_TOKEN renamed to RELEASES_GITLAB_READ_TOKEN
|
32
|
+
- Add `available_versions` method to return the available GitLab versions (sorted by most recent)
|
21
33
|
|
22
|
-
## [0.2.
|
34
|
+
## [0.2.5] - 2023-11-23
|
23
35
|
|
24
|
-
-
|
36
|
+
- Add methods to calculate the current version of a given date (`#current_minor_for_date`) and the previous minors for a specific version (`#previous_minors`)
|
25
37
|
|
26
|
-
## [0.2.
|
38
|
+
## [0.2.4] - 2023-11-03
|
27
39
|
|
28
|
-
-
|
40
|
+
- Remove logic for static release date. All release dates will be calculated based on the third Thursday of the month.
|
29
41
|
|
30
42
|
## [0.2.3] - 2023-10-11
|
31
43
|
|
32
44
|
- Update ActiveSupport gem and loosen version restriction
|
33
45
|
|
34
|
-
## [0.2.
|
46
|
+
## [0.2.2] - 2023-10-02
|
35
47
|
|
36
|
-
-
|
48
|
+
- Fixed `previous_version` to return the latest patch of the previous minor version.
|
37
49
|
|
38
|
-
## [0.2.
|
50
|
+
## [0.2.1] - 2023-09-25
|
39
51
|
|
40
|
-
-
|
52
|
+
- `GitlabReleases.active_version` was updated to consider dates equal than the date provided. This mirrors the logic used in release-tools.
|
41
53
|
|
42
|
-
## [0.2.
|
54
|
+
## [0.2.0] - 2023-08-31
|
43
55
|
|
44
|
-
-
|
56
|
+
- Gem renamed to `gitlab-releases` to align with GitLab gem naming conventions
|
57
|
+
- PRODUCTION_TOKEN renamed to RELEASES_GITLAB_READ_TOKEN
|
45
58
|
|
46
|
-
## [0.
|
59
|
+
## [0.1.3] - 2023-08-22
|
47
60
|
|
48
|
-
-
|
61
|
+
- `version_for_date` and `previous_version` methods included.
|
49
62
|
|
50
|
-
## [0.2
|
63
|
+
## [0.1.2] - 2023-08-22
|
51
64
|
|
52
65
|
- Yanked version
|
53
66
|
|
54
|
-
## [0.
|
55
|
-
|
56
|
-
- Fixes `ReleaseCalculator` class to consider major milestones.
|
67
|
+
## [0.1.1] - 2023-08-21
|
57
68
|
|
58
|
-
|
69
|
+
- Gem renamed to `releases` to account for new utility methods included (`active_version`, `current_version`, `next_versions`)
|
59
70
|
|
60
|
-
|
61
|
-
- Upgrade gitlab gem to 4.20.1
|
62
|
-
- Add runbook for publishing new versions of this gem
|
71
|
+
## [0.1.0] - 2023-08-01
|
63
72
|
|
64
|
-
|
73
|
+
- Initial release. Starting with 16.6, GitLab monthly release date will be moved from the 22nd to the 3rd Thursday of each month, this gem automatically calculates the release dates and the associated version for 12 months in advance.
|
data/Gemfile
CHANGED
@@ -5,8 +5,8 @@ source 'https://rubygems.org'
|
|
5
5
|
# Specify your gem's dependencies in gitlab-releases.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
gem 'activesupport', '~>
|
9
|
-
gem 'gitlab', '~>
|
8
|
+
gem 'activesupport', '~> 8.0'
|
9
|
+
gem 'gitlab', '~> 5.1'
|
10
10
|
gem 'http', '~> 5.2.0'
|
11
11
|
gem 'rake', '~> 13.0'
|
12
12
|
gem 'retriable', '~> 3.1.2'
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gitlab-releases (1.
|
5
|
-
activesupport (~>
|
6
|
-
gitlab (~>
|
4
|
+
gitlab-releases (1.1.0)
|
5
|
+
activesupport (~> 8.0)
|
6
|
+
gitlab (~> 5.1)
|
7
7
|
http (~> 5.2.0, ~> 5.2)
|
8
8
|
retriable (~> 3.1.2)
|
9
9
|
version_sorter (~> 2.3.0)
|
@@ -11,25 +11,29 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (
|
14
|
+
activesupport (8.0.0)
|
15
15
|
base64
|
16
|
+
benchmark (>= 0.3)
|
16
17
|
bigdecimal
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
18
19
|
connection_pool (>= 2.2.5)
|
19
20
|
drb
|
20
21
|
i18n (>= 1.6, < 2)
|
22
|
+
logger (>= 1.4.2)
|
21
23
|
minitest (>= 5.1)
|
22
|
-
|
23
|
-
tzinfo (~> 2.0)
|
24
|
+
securerandom (>= 0.3)
|
25
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
26
|
+
uri (>= 0.13.1)
|
24
27
|
addressable (2.8.6)
|
25
28
|
public_suffix (>= 2.0.2, < 6.0)
|
26
29
|
ast (2.4.2)
|
27
30
|
base64 (0.2.0)
|
31
|
+
benchmark (0.4.0)
|
28
32
|
bigdecimal (3.1.8)
|
29
33
|
binding_of_caller (1.0.1)
|
30
34
|
debug_inspector (>= 1.2.0)
|
31
35
|
coderay (1.1.3)
|
32
|
-
concurrent-ruby (1.3.
|
36
|
+
concurrent-ruby (1.3.4)
|
33
37
|
connection_pool (2.4.1)
|
34
38
|
crack (1.0.0)
|
35
39
|
bigdecimal
|
@@ -42,10 +46,12 @@ GEM
|
|
42
46
|
ffi (1.17.0)
|
43
47
|
ffi (1.17.0-arm64-darwin)
|
44
48
|
ffi (1.17.0-x86_64-darwin)
|
49
|
+
ffi (1.17.0-x86_64-linux-gnu)
|
45
50
|
ffi-compiler (1.3.2)
|
46
51
|
ffi (>= 1.15.5)
|
47
52
|
rake
|
48
|
-
gitlab (
|
53
|
+
gitlab (5.1.0)
|
54
|
+
base64 (~> 0.2.0)
|
49
55
|
httparty (~> 0.20)
|
50
56
|
terminal-table (>= 1.5.1)
|
51
57
|
hashdiff (1.1.0)
|
@@ -62,19 +68,19 @@ GEM
|
|
62
68
|
csv
|
63
69
|
mini_mime (>= 1.0.0)
|
64
70
|
multi_xml (>= 0.5.2)
|
65
|
-
i18n (1.14.
|
71
|
+
i18n (1.14.6)
|
66
72
|
concurrent-ruby (~> 1.0)
|
67
73
|
json (2.7.2)
|
68
74
|
language_server-protocol (3.17.0.3)
|
69
75
|
llhttp-ffi (0.5.0)
|
70
76
|
ffi-compiler (~> 1.0)
|
71
77
|
rake (~> 13.0)
|
78
|
+
logger (1.6.1)
|
72
79
|
method_source (1.1.0)
|
73
80
|
mini_mime (1.1.5)
|
74
|
-
minitest (5.
|
81
|
+
minitest (5.25.1)
|
75
82
|
multi_xml (0.7.1)
|
76
83
|
bigdecimal (~> 3.1)
|
77
|
-
mutex_m (0.2.0)
|
78
84
|
parallel (1.25.1)
|
79
85
|
parser (3.3.3.0)
|
80
86
|
ast (~> 2.4.1)
|
@@ -133,6 +139,7 @@ GEM
|
|
133
139
|
rubocop-ast (1.31.3)
|
134
140
|
parser (>= 3.3.1.0)
|
135
141
|
ruby-progressbar (1.13.0)
|
142
|
+
securerandom (0.3.2)
|
136
143
|
strscan (3.1.0)
|
137
144
|
terminal-table (3.0.2)
|
138
145
|
unicode-display_width (>= 1.1.1, < 3)
|
@@ -143,6 +150,7 @@ GEM
|
|
143
150
|
unparser (0.6.15)
|
144
151
|
diff-lcs (~> 1.3)
|
145
152
|
parser (>= 3.3.0)
|
153
|
+
uri (1.0.2)
|
146
154
|
vcr (6.2.0)
|
147
155
|
version_sorter (2.3.0)
|
148
156
|
webmock (3.18.1)
|
@@ -157,10 +165,11 @@ PLATFORMS
|
|
157
165
|
ruby
|
158
166
|
x86_64-darwin-20
|
159
167
|
x86_64-darwin-22
|
168
|
+
x86_64-linux
|
160
169
|
|
161
170
|
DEPENDENCIES
|
162
|
-
activesupport (~>
|
163
|
-
gitlab (~>
|
171
|
+
activesupport (~> 8.0)
|
172
|
+
gitlab (~> 5.1)
|
164
173
|
gitlab-releases!
|
165
174
|
http (~> 5.2.0)
|
166
175
|
pry (~> 0.14.0)
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Library to interact with GitLab releases and versions. The information is fetche
|
|
12
12
|
Gemfile:
|
13
13
|
|
14
14
|
```
|
15
|
-
gem 'gitlab-releases', '~> 1.
|
15
|
+
gem 'gitlab-releases', '~> 1.1.0'
|
16
16
|
```
|
17
17
|
|
18
18
|
Install:
|
@@ -35,11 +35,12 @@ There are different methods available:
|
|
35
35
|
* `active_version` - Returns the active GitLab version.
|
36
36
|
* `current_version` - Returns the current GitLab minor version.
|
37
37
|
* `next_versions` - Returns the next GitLab patch versions (for patch and security releases).
|
38
|
-
* `previous_version` - Returns the
|
38
|
+
* `previous_version` - Returns the latest patch of the previous minor version.
|
39
39
|
* `version_for_date` - Returns the active GitLab version for the given date
|
40
40
|
* `current_minor_for_date` - Returns the current GitLab minor for the given date
|
41
41
|
* `previous_minors` - Returns the previous minors for the given version
|
42
42
|
* `next_patch_release_date` - Calculates the next best effort date for a GitLab patch release.
|
43
|
+
* `latest_patch_for_version` - Returns the latest patch for the given minor version
|
43
44
|
|
44
45
|
To make use of it:
|
45
46
|
|
@@ -83,6 +84,8 @@ To make use of it:
|
|
83
84
|
=> ["16.6", "16.5", "16.4"]
|
84
85
|
> GitlabReleases.next_patch_release_date
|
85
86
|
=> "2024-03-13"
|
87
|
+
> GitlabReleases.latest_patch_for_version('16.6')
|
88
|
+
=> "16.6.10"
|
86
89
|
|
87
90
|
```
|
88
91
|
|
@@ -103,4 +106,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
103
106
|
Everyone interacting in the Releases project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/main/CODE_OF_CONDUCT.md).
|
104
107
|
|
105
108
|
[Delivery team tracker]: https://gitlab.com/gitlab-com/gl-infra/delivery
|
106
|
-
[Releases documentation]: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/
|
109
|
+
[Releases documentation]: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/main/docs/releases.md
|
@@ -155,6 +155,19 @@ class ReleaseVersions
|
|
155
155
|
next_versions.second.previous_patch
|
156
156
|
end
|
157
157
|
|
158
|
+
# Returns the latest patch for a given minor version
|
159
|
+
#
|
160
|
+
# For example:
|
161
|
+
# - If the given version is 16.7 and available versions include 16.7.0, 16.7.1, 16.7.2
|
162
|
+
# it will return 16.7.2
|
163
|
+
# - If the given version is 16.5 and available versions include 16.5.0, 16.5.1
|
164
|
+
# it will return 16.5.1
|
165
|
+
def self.latest_patch_for_version(version)
|
166
|
+
minor_version = ReleaseVersion.new(version).to_minor
|
167
|
+
|
168
|
+
available_versions.find { |v| v.start_with?("#{minor_version}.") }
|
169
|
+
end
|
170
|
+
|
158
171
|
def self.sort(versions)
|
159
172
|
::VersionSorter.sort(versions).uniq
|
160
173
|
end
|
data/lib/gitlab_releases.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-releases
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mayra Cabrera
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '8.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '8.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gitlab
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '5.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '5.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: http
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,7 +86,7 @@ dependencies:
|
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 2.3.0
|
89
|
-
description:
|
89
|
+
description:
|
90
90
|
email:
|
91
91
|
- mcabrera@gitlab.com
|
92
92
|
executables: []
|
@@ -121,7 +121,7 @@ metadata:
|
|
121
121
|
homepage_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases
|
122
122
|
source_code_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases
|
123
123
|
changelog_uri: https://gitlab.com/gitlab-org/ruby/gems/gitlab-releases/-/blob/main/CHANGELOG.md
|
124
|
-
post_install_message:
|
124
|
+
post_install_message:
|
125
125
|
rdoc_options: []
|
126
126
|
require_paths:
|
127
127
|
- lib
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubygems_version: 3.5.9
|
140
|
-
signing_key:
|
140
|
+
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Utilities for GitLab releases and versions
|
143
143
|
test_files: []
|