Skip to content

Consider support of a gen-version script #140

@Totktonada

Description

@Totktonada

In the scope of tarantool/tarantool#6182 we want to explicitly mark tarantool's pre-releases as X.Y.Z-alphaN, X.Y.Z-betaN, X.Y.Z-rcN (releases will remain X.Y.Z). We also want to add a '-dev' suffix for nightly builds (I mean, for builds that are NOT constructed from a tagged commit). We meet several problems around packpack on this road.

  1. The VERSION environment variable value is declined if it does not correspond to the format expected by packpack (A.B.C.D.<...>) (see also the packpack patch in this commit).
  2. Packpack stores git describe --long --always output in the VERSION file even when we provide the VERSION variable externally. Now there is no way to store something in our own format in the VERSION file (AFAIU).
  3. We need different formats for RPM / Deb / tarball / VERSION file (at least X.Y.Z~betaN should be used in packages to order it before X.Y.Z; the VERSION file is bundled into the executable at building and used in several APIs).

I propose the following flow:

  • Packpack calls ./gen-version VERSION script from the repository root, if it is present, to generate the VERSION file content before creating tarball (when we're in a git repository).
  • Packpack calls ./gen-version tarball, when packpack tarball is called (and the script is present), to use in construction of a tarball file name.
  • Packpack calls ./gen-version rpm|deb, when it is called to generate RPM or Deb package, to fill the Version field / a last changelog entry and construct a package file name.

This way we'll have a great flexibility in the version format.

Also we'll able to get rid of scripting around packpack to set a VERSION variable and may return back to just call OS=<...> DIST=<...> /path/to/packpack to package a project. I think it is the nice property.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions