Skip to content

Commit 78abdce

Browse files
committed
ci: add support for 2.10+ releases in latest-version action
1 parent 615e8f4 commit 78abdce

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/actions/latest-version/action.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
# # ---> 1.10.13-0
2525
# - run: echo ${{ steps.latest-version.outputs.git-describe }}
2626
# # ---> 1.10.13-0-g1d2c5aad5
27-
#
28-
# Caution: It works smoothly only for 1.10/2.8, but not for 2.10+
29-
# due to changes in the package versioning (see the new release
30-
# policy document, [1]).
31-
#
32-
# [1]: https://github.com/tarantool/tarantool/discussions/6182
3327

3428
name: 'Latest tarantool version'
3529
description: 'Get latest tarantool version of given release series'
@@ -80,6 +74,22 @@ runs:
8074
* parts[5]: '1'
8175
*/
8276
var parts = v.split(/[.-]/)
77+
var major = Number(parts[0])
78+
var minor = Number(parts[1])
79+
80+
/*
81+
* Fix version format change after 2.10
82+
* due to changes in the package versioning (see the new release
83+
* policy document, [1]).
84+
*
85+
* [1]: https://github.com/tarantool/tarantool/discussions/6182
86+
*/
87+
if (
88+
major >= 3 ||
89+
(major == 2 && minor >= 10)
90+
) {
91+
parts.splice(3, 0, '0');
92+
}
8393
8494
var abc = parts.slice(0, 3).join('.')
8595
var abcd = `${abc}.${parts[3]}`

0 commit comments

Comments
 (0)