Skip to content

Conversation

DifferentialOrange
Copy link
Member

@DifferentialOrange DifferentialOrange commented Jan 26, 2023

This patch introduces the fix of existing module version info together with new version providing policy (potentially temporary). It is a prerequirement to tarantool/tarantool#8192.

New VERSION/_VERSION is a plain Lua string controlled by the developer.

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

This PR is also a 0.16.0 release patch.

I didn't forget about

  • Tests (I think it's not worth it)
  • Changelog
  • Documentation (README and rst)
  • Rockspec and rpm spec

Close #330, part of tarantool/tarantool#8192

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
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.
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/release-0.16.0 branch from 4d063e5 to af634ba Compare January 26, 2023 15:45
@yngvar-antonsson yngvar-antonsson merged commit 8f9b667 into master Jan 27, 2023
@yngvar-antonsson yngvar-antonsson deleted the DifferentialOrange/release-0.16.0 branch January 27, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a way to check version in code
2 participants