From b63093938a2988611bd568220fae6281f106c493 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 26 Jan 2023 18:34:52 +0300 Subject: [PATCH 1/3] api: set version in code Before this patch, it was assumed that version would be set automatically with CI. Yet, current approach don't work. This patch replaces this approach with simple manual solution. The rules are as follows: - bump version to X.Y.Z in release commit, - bump version to X.Y.Z-scm in the following commit. luarocks.core.vers comparison treats scm version as we expect them to: - X.Y.Z-scm > X.Y.Z - X.Y.Z+1 > X.Y.Z-scm - X.Y+1.0 > X.Y.Z-scm - X+1.0.0 > X.Y.Z-scm The version approach may be reworked later, but since we need a valid version info for tarantool/tarantool#8192, we implement this one at least for now. Closes #330, part of tarantool/tarantool#8192 --- .github/workflows/push_rockspec.yml | 1 - metrics/init.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/push_rockspec.yml b/.github/workflows/push_rockspec.yml index 5aa9c16b..74d1a23e 100644 --- a/.github/workflows/push_rockspec.yml +++ b/.github/workflows/push_rockspec.yml @@ -41,7 +41,6 @@ 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 56eae4ec..554e86ff 100644 --- a/metrics/init.lua +++ b/metrics/init.lua @@ -10,7 +10,7 @@ local Gauge = require('metrics.collectors.gauge') local Histogram = require('metrics.collectors.histogram') local Summary = require('metrics.collectors.summary') -local VERSION = 'scm-1' +local VERSION = '0.15.1-scm' local registry = rawget(_G, '__metrics_registry') if not registry then From 8b398b5a1befc6ee64f2bea08ae6f4de294e37fd Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 26 Jan 2023 18:38:41 +0300 Subject: [PATCH 2/3] api: provide _VERSION module info As a part of new module policy, each module must have version info stored in module._VERSION. For now, metrics._VERSION a duplicate of metrics.VERSION, but the latter is likely to be deprecated later. --- metrics/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/metrics/init.lua b/metrics/init.lua index 554e86ff..a6841b20 100644 --- a/metrics/init.lua +++ b/metrics/init.lua @@ -156,4 +156,5 @@ return { http_middleware = require('metrics.http_middleware'), collect = collect, VERSION = VERSION, + _VERSION = VERSION, } From af634baf697d30c7472c8e90dbf4302139e6a480 Mon Sep 17 00:00:00 2001 From: Georgy Moiseev Date: Thu, 26 Jan 2023 18:39:37 +0300 Subject: [PATCH 3/3] release: 0.16.0 --- CHANGELOG.md | 1 + metrics/init.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1755dc1d..77753f69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.16.0] - 2023-01-27 ### Added - Handle to clear psutils metrics diff --git a/metrics/init.lua b/metrics/init.lua index a6841b20..93c68995 100644 --- a/metrics/init.lua +++ b/metrics/init.lua @@ -10,7 +10,7 @@ local Gauge = require('metrics.collectors.gauge') local Histogram = require('metrics.collectors.histogram') local Summary = require('metrics.collectors.summary') -local VERSION = '0.15.1-scm' +local VERSION = '0.16.0' local registry = rawget(_G, '__metrics_registry') if not registry then