Skip to content

Commit

Permalink
Add runtime info about version (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
filonenko-mikhail authored Mar 23, 2022
1 parent 088e8b0 commit a7e666f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/push_rockspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
-e "s/branch = '.\+'/tag = '${GIT_TAG}'/g" \
-e "s/version = '.\+'/version = '${GIT_TAG}-1'/g" \
${{ env.ROCK_NAME }}-scm-1.rockspec > ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec
sed -i "s/local VERSION = 'scm-1'/local VERSION = '"${GIT_TAG}"-1'/g" metrics/init.lua
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
Expand Down
3 changes: 3 additions & 0 deletions metrics/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ local Gauge = require('metrics.collectors.gauge')
local Histogram = require('metrics.collectors.histogram')
local Summary = require('metrics.collectors.summary')

local VERSION = 'scm-1'

local registry = rawget(_G, '__metrics_registry')
if not registry then
registry = Registry.new()
Expand Down Expand Up @@ -137,4 +139,5 @@ return {
end,
http_middleware = require('metrics.http_middleware'),
collect = collect,
VERSION = VERSION,
}

0 comments on commit a7e666f

Please sign in to comment.