Skip to content

Commit 0caab75

Browse files
no1semanTotktonada
authored andcommitted
Inject module's version
1 parent 21e0a74 commit 0caab75

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
tarantool-version: '2.8'
1717

1818
- run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
19+
- run: echo "return { VERSION = '"$TAG"-1' }" > graphql/init.lua
1920
- run: tarantoolctl rocks new_version --tag $TAG
2021
- run: tarantoolctl rocks pack graphql-$TAG-1.rockspec
2122

graphql/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
return { VERSION = 'scm-1' }

test/unit/graphql_test.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,3 +1088,7 @@ function g.test_util_find_by_name()
10881088
'var')
10891089
t.assert_equals(res, { name = 'var', value = 2 })
10901090
end
1091+
1092+
g.test_version = function()
1093+
t.assert_equals(require('graphql').VERSION, 'scm-1')
1094+
end

0 commit comments

Comments
 (0)