Skip to content

api: add hardcoded versioning support #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ on:
tags: ['*']

jobs:
version-check:
# We need this job to run only on push with tag.
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-20.04
steps:
- name: Check module version
uses: tarantool/actions/check-module-version@master
with:
module-name: 'errors'

publish-scm-1:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
Expand All @@ -18,6 +28,7 @@ jobs:

publish-tag:
if: startsWith(github.ref, 'refs/tags/')
needs: version-check
runs-on: ubuntu-20.04
env:
CMAKE_LDOC_FIND_REQUIRED: 'YES'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Add versioning support.

## [2.2.1] - 2021-08-16

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions errors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ local function errors_assert(class_name, ...)
end

return {
_VERSION = require('errors.version'),

list = list,
new_class = new_class,
netbox_call = netbox_call,
Expand Down
4 changes: 4 additions & 0 deletions errors/version.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- Сontains the module version.
-- Requires manual update in case of release commit.

return '2.2.1'