diff --git a/.github/workflows/push_rockspec.yml b/.github/workflows/push_rockspec.yml index eda66fa1..ca46783c 100644 --- a/.github/workflows/push_rockspec.yml +++ b/.github/workflows/push_rockspec.yml @@ -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: diff --git a/metrics/init.lua b/metrics/init.lua index 980d75dc..1ebbbba8 100644 --- a/metrics/init.lua +++ b/metrics/init.lua @@ -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() @@ -137,4 +139,5 @@ return { end, http_middleware = require('metrics.http_middleware'), collect = collect, + VERSION = VERSION, }