File tree Expand file tree Collapse file tree 5 files changed +35
-1
lines changed Expand file tree Collapse file tree 5 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,22 @@ name: packaging
33on : [push, pull_request]
44
55jobs :
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+
622 package :
723 # Skip pull request jobs when the source branch is in the same
824 # repository.
1228 # Packaging for CentOS 7 does not work with other versions, see:
1329 # https://github.com/packpack/packpack/issues/145
1430 runs-on : ubuntu-20.04
31+ needs : version-check
1532
1633 strategy :
1734 fail-fast : false
Original file line number Diff line number Diff line change 66 tags : ['*']
77
88jobs :
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+
919 publish-rockspec-scm-1 :
1020 if : github.ref == 'refs/heads/master'
1121 runs-on : ubuntu-latest
1929 publish-rockspec-tag :
2030 if : startsWith(github.ref, 'refs/tags/')
2131 runs-on : ubuntu-latest
32+ needs : version-check
2233 steps :
2334 - uses : actions/checkout@v3
2435
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ build = {
2727 [' queue.abstract.driver.limfifottl' ] = ' queue/abstract/driver/limfifottl.lua' ,
2828 [' queue.compat' ] = ' queue/compat.lua' ,
2929 [' queue.util' ] = ' queue/util.lua' ,
30- [' queue' ] = ' queue/init.lua'
30+ [' queue' ] = ' queue/init.lua' ,
31+ [' queue.version' ] = ' queue/version.lua'
3132 }
3233}
3334
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ queue = setmetatable({
3939 register_driver = register_driver ,
4040 state = queue_state .show ,
4141 cfg = deferred_cfg ,
42+ _VERSION = require (' queue.version' ),
4243}, { __index = function ()
4344 print (debug.traceback ())
4445 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