File tree 5 files changed +35
-1
lines changed
5 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,22 @@ name: packaging
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
+ # Run not only on tags, otherwise dependent job will skip.
7
+ version-check :
8
+ # Skip pull request job when the source branch is in the same
9
+ # repository.
10
+ if : |
11
+ github.event_name == 'push' ||
12
+ github.event.pull_request.head.repo.full_name != github.repository
13
+ runs-on : ubuntu-20.04
14
+ steps :
15
+ - name : Check module version
16
+ # We need this step to run only on push with tag.
17
+ if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
18
+ uses : tarantool/actions/check-module-version@master
19
+ with :
20
+ module-name : ' queue'
21
+
6
22
package :
7
23
# Skip pull request jobs when the source branch is in the same
8
24
# repository.
12
28
# Packaging for CentOS 7 does not work with other versions, see:
13
29
# https://github.com/packpack/packpack/issues/145
14
30
runs-on : ubuntu-20.04
31
+ needs : version-check
15
32
16
33
strategy :
17
34
fail-fast : false
Original file line number Diff line number Diff line change 6
6
tags : ['*']
7
7
8
8
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 : ' queue'
18
+
9
19
publish-rockspec-scm-1 :
10
20
if : github.ref == 'refs/heads/master'
11
21
runs-on : ubuntu-latest
19
29
publish-rockspec-tag :
20
30
if : startsWith(github.ref, 'refs/tags/')
21
31
runs-on : ubuntu-latest
32
+ needs : version-check
22
33
steps :
23
34
- uses : actions/checkout@v3
24
35
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ build = {
27
27
[' queue.abstract.driver.limfifottl' ] = ' queue/abstract/driver/limfifottl.lua' ,
28
28
[' queue.compat' ] = ' queue/compat.lua' ,
29
29
[' queue.util' ] = ' queue/util.lua' ,
30
- [' queue' ] = ' queue/init.lua'
30
+ [' queue' ] = ' queue/init.lua' ,
31
+ [' queue.version' ] = ' queue/version.lua'
31
32
}
32
33
}
33
34
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ queue = setmetatable({
39
39
register_driver = register_driver ,
40
40
state = queue_state .show ,
41
41
cfg = deferred_cfg ,
42
+ _VERSION = require (' queue.version' ),
42
43
}, { __index = function ()
43
44
print (debug.traceback ())
44
45
error (' Please configure box.cfg{} in read/write mode first' )
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.2.5'
You can’t perform that action at this time.
0 commit comments