Git Product home page Git Product logo

git-rpm-version's Introduction

git-rpm-version

Compute the rpm version and release based on the most recent tag matching v*

Tree                         RPM Name
---------------------------  --------------------------
<dirty working tree>         foo-2.0.0-1.dirty.rpm
* e553fd9 (tag: v2.0.0)      foo-2.0.0-1.rpm
* 9dbedc2 (tag: v2.0.0-rc1)  foo-2.0.0-0.rc1.rpm
* 0453d18                    foo-1.0.1-1.2.g0453d18.rpm
*   f8cfa92                  foo-1.0.1-1.1.gf8cfa92.rpm
|\
| * 33dcc6f (tag: v1.0.1)    foo-1.0.1-1.rpm
* | 1afd2e4                  foo-1.0.0-1.1.g1afd2e4.rpm
|/
* fb631ec (tag: v1.0.0)      foo-1.0.0-1.rpm
* 205005c                    foo-0-g205005c.rpm

If the code being built does not exactly match a release tag, the rpm release will contain additional build information to help identify what source it came from.

foo-1.2.3-1.4.g2f3cc98.dirty
^   ^     ^ ^ ^^       ^
|   |     | | ||       If the working tree is dirty
|   |     | | |Hash of current commit if different than the tag
|   |     | | Indicates that the following is a Git hash
|   |     | Number of additional commits ahead of the tag
|   |     0 if release candidate, 1 otherwise
|   Most recent tagged release
Package name

Release tags must be annotated tags and be in the form vX.Y.Z or vX.Y.Z-rcW where W, X, Y, and Z are integers. vX.Y.Z is assumed to be newer than vX.Y.Z-rcW. Otherwise, X, Y, Z, and W are compared one by one. If the numbers are different, the larger number is considered newer. If the numbers are equal, the next number is compared.

This algorithm follows the Fedora convention for mapping software releases to rpm version and release numbers.

git-rpm-version's People

Contributors

peterlundgren avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.