Skip to content

Commit aa7d932

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 6f041ee commit aa7d932

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

.github/workflows/check_on_push.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ on:
55
pull_request:
66

77
jobs:
8+
version-check:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- name: Run action
12+
uses: tarantool/actions/check-module-version@igrishnov/gh-204-add-hardcoded-versioning-support
13+
with:
14+
module-name: 'crud'
15+
repository: 'tarantool/crud'
16+
817
run-static-analysis:
918
if: |
1019
github.event_name == 'push' ||

.github/workflows/push_rockspec.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ env:
1111
ROCK_NAME: "crud"
1212

1313
jobs:
14+
version-check:
15+
runs-on: ubuntu-20.04
16+
steps:
17+
- name: Run action
18+
uses: tarantool/actions/check-module-version@igrishnov/gh-204-add-hardcoded-versioning-support
19+
with:
20+
module-name: 'crud'
21+
repository: 'tarantool/crud'
22+
1423
push-scm-rockspec:
1524
runs-on: ubuntu-20.04
1625
if: github.ref == 'refs/heads/master'
26+
needs: version-check
1727
steps:
1828
- uses: actions/checkout@master
1929

@@ -25,6 +35,7 @@ jobs:
2535
push-tagged-rockspec:
2636
runs-on: ubuntu-20.04
2737
if: startsWith(github.ref, 'refs/tags')
38+
needs: version-check
2839
steps:
2940
- uses: actions/checkout@master
3041

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
* Add versioning support (PR #342).
910

1011
### Fixed
1112
* Pre-hotreload `cartridge` support (older than 2.4.0) (PR #341).

crud.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ local stats = require('crud.stats')
2323

2424
local crud = {}
2525

26+
-- @refer crud.version
27+
-- @tfield string _VERSION
28+
-- Contains hardcoded value of the CRUD version.
29+
crud._VERSION = require('crud.version')
30+
2631
--- CRUD operations.
2732
-- @section crud
2833

crud/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 '1.0.0'

0 commit comments

Comments
 (0)