File tree Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 11
11
ROCK_NAME : " crud"
12
12
13
13
jobs :
14
+ version-check :
15
+ runs-on : ubuntu-20.04
16
+ steps :
17
+ - name : Check module version
18
+ uses : tarantool/actions/check-module-version@igrishnov/gh-204-add-hardcoded-versioning-support
19
+ with :
20
+ module-name : ' crud'
21
+
14
22
push-scm-rockspec :
15
23
runs-on : ubuntu-20.04
16
24
if : github.ref == 'refs/heads/master'
25
+ needs : version-check
17
26
steps :
18
27
- uses : actions/checkout@master
19
28
25
34
push-tagged-rockspec :
26
35
runs-on : ubuntu-20.04
27
36
if : startsWith(github.ref, 'refs/tags')
37
+ needs : version-check
28
38
steps :
29
39
- uses : actions/checkout@master
30
40
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
7
7
8
8
## [ Unreleased]
9
+ * Add versioning support (PR #342 ).
9
10
10
11
### Fixed
11
12
* Pre-hotreload ` cartridge ` support (older than 2.4.0) (PR #341 ).
Original file line number Diff line number Diff line change @@ -23,6 +23,16 @@ local stats = require('crud.stats')
23
23
24
24
local crud = {}
25
25
26
+ -- @refer crud.version
27
+ -- @tfield string _VERSION
28
+ -- Contains hardcoded value of the CRUD version.
29
+ -- The version value is marked in the separate file
30
+ -- crud/version.lua and must be updated manually in
31
+ -- case of release commit.
32
+ -- Thus, it is possible to get the module version
33
+ -- via require('crud')._VERSION as string value.
34
+ crud ._VERSION = require (' crud.version' )
35
+
26
36
--- CRUD operations.
27
37
-- @section crud
28
38
Original file line number Diff line number Diff line change
1
+ -- Сontains the module version.
2
+ -- Requires manual update in case of release commit.
3
+
4
+ return ' 1.0.0'
You can’t perform that action at this time.
0 commit comments