terrapkg / packages

Monorepo for Terra Packages
https://terra.fyralabs.com
GNU General Public License v3.0
68 stars 20 forks source link

[RFC] Versioning scheme for commit-based versioning #1907

Open korewaChino opened 1 month ago

korewaChino commented 1 month ago

Right now, the unwritten rule for commit/snapshot-based RPM package is to version it using this format:

%{date}.%{shortcommit}

This is not documented very well, and we may get inconsistent versioning from various contributors for nightly or any packages without a proper release.

I propose a universal, consistent versioning scheme for Terra packages that do not have a concrete release tag upstream or builds from a specific commit.

The format is as follows:

So for example, a Git-based package would be named this:

%{date}.git~%{shortcommit}

20240815.git~abcedfg

We should also document a workflow for at least Git, to use macros when doing Git commits, or write our own macro to shorten SHA hashes.

%global shortcommit %(c=%{commit}; echo ${c:0:7})
linear[bot] commented 1 month ago

FYRA-65 [RFC] Versioning scheme for commit-based versioning