Skip to content

Commit c2f9a12

Browse files
committed
api: add hardcoded versioning support
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 c2f9a12

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@ on:
66
tags: ['*']
77

88
jobs:
9+
version-check:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: Check module version
13+
uses: tarantool/actions/check-module-version@igrishnov/gh-204-add-hardcoded-versioning-support
14+
with:
15+
module-name: 'errors'
16+
917
publish-scm-1:
1018
if: github.ref == 'refs/heads/master'
19+
needs: version-check
1120
runs-on: ubuntu-20.04
1221
steps:
1322
- uses: actions/checkout@v3
@@ -18,6 +27,7 @@ jobs:
1827

1928
publish-tag:
2029
if: startsWith(github.ref, 'refs/tags/')
30+
needs: version-check
2131
runs-on: ubuntu-20.04
2232
env:
2333
CMAKE_LDOC_FIND_REQUIRED: 'YES'

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
workflow_dispatch:
66

77
jobs:
8+
version-check:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: Check module version
12+
uses: tarantool/actions/check-module-version@igrishnov/gh-204-add-hardcoded-versioning-support
13+
with:
14+
module-name: 'errors'
15+
816
test:
917
strategy:
1018
fail-fast: false

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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)