File tree 1 file changed +16
-6
lines changed
.github/actions/latest-version
1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change 24
24
# # ---> 1.10.13-0
25
25
# - run: echo ${{ steps.latest-version.outputs.git-describe }}
26
26
# # ---> 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
33
27
34
28
name : ' Latest tarantool version'
35
29
description : ' Get latest tarantool version of given release series'
80
74
* parts[5]: '1'
81
75
*/
82
76
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
+ }
83
93
84
94
var abc = parts.slice(0, 3).join('.')
85
95
var abcd = `${abc}.${parts[3]}`
You can’t perform that action at this time.
0 commit comments