Skip to content

Commit 99c5637

Browse files
authored
api: add hardcoded versioning support (#46)
Added the _VERSION variable to the exported table. Is part of the task [1]. 1. github.com/tarantool/roadmap-internal/issues/204
1 parent ac90b13 commit 99c5637

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

.github/workflows/publish.yml

+11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ on:
66
tags: ['*']
77

88
jobs:
9+
version-check:
10+
# We need this job to run only on push with tag.
11+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- name: Check module version
15+
uses: tarantool/actions/check-module-version@master
16+
with:
17+
module-name: 'errors'
18+
919
publish-scm-1:
1020
if: github.ref == 'refs/heads/master'
1121
runs-on: ubuntu-20.04
@@ -18,6 +28,7 @@ jobs:
1828

1929
publish-tag:
2030
if: startsWith(github.ref, 'refs/tags/')
31+
needs: version-check
2132
runs-on: ubuntu-20.04
2233
env:
2334
CMAKE_LDOC_FIND_REQUIRED: 'YES'

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- Add versioning support.
12+
913
## [2.2.1] - 2021-08-16
1014

1115
### Fixed

errors.lua

+2
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,8 @@ local function errors_assert(class_name, ...)
561561
end
562562

563563
return {
564+
_VERSION = require('errors.version'),
565+
564566
list = list,
565567
new_class = new_class,
566568
netbox_call = netbox_call,

errors/version.lua

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- Сontains the module version.
2+
-- Requires manual update in case of release commit.
3+
4+
return '2.2.1'

0 commit comments

Comments
 (0)