Skip to main content

print semantic version for git projects

Project description

lu-semver

Print Semantic Version for Git project.

Intended usage: makefiles and build scripts to print meaningful project version.

Usage

Let's take this repo as example

* 4cf9ba3 (HEAD -> master) sync 11
* ac24825 sync 10
* 73745a4 sync 9
| * 856d14b (feat2) sync 8
| * 1fcbaf1 sync 7
| * 2a02f9b sync 6
|/
* b62e51a (tag: 1.3.0) sync 5
* 027b518 sync 4
| * d58163e (feat1) sync 3
| * d658ddc sync 2
|/
* 217658d (tag: 1.0.0) sync 1
* ad3d54e initial commit

Running lu-semver for project's refs give below output

command output
lu-semver 1.3.1-rc.3.git.4cf9ba3
lu-semver --ver @same 1.3.0-dev.3.git.4cf9ba3
lu-semver --ver @next --fmt 'branch,count:pfx=rc,scm,extra' 1.3.1-rc.3.git.4cf9ba3
lu-semver --ver @next --fmt 'branch,count:pfx=rc,scm,extra' --extra gcc.9 1.3.1-rc.3.git.4cf9ba3.gcc.9
lu-semver --ver @same --fmt 'branch,count,extra' --extra gcc.9 1.3.0-dev.3.gcc.9
lu-semver --ver @latest latest
lu-semver --ver @latest feat1 latest-feat1
lu-semver feat1 1.0.1-feat1.rc.2.git.d58163e
lu-semver --fmt 'branch,count,extra' --extra gcc.9 feat1 1.0.1-feat1.dev.2.gcc.9
lu-semver feat2 1.3.1-feat2.rc.3.git.856d14b
lu-semver 1.3.0 1.3.0

Format of Release info

Release info format is a coma separated list of plugins, where a plugin is a string of the form 'name:arg1=val1:arg2=val2'. Args are optional.

Plugins: branch - prints branch name unless or nothing if it's in 'omit' list min: branch default: branch:omit=master ex1: branch:omit=master,v8.0

count - prints number of commits from last tag or nothing for tags min: count default: count:pfx=dev ex1: count:pfx=rc

extra - prints 'extra' command line option min: extra default: extra

scm - prints SCM info. Only git is currently supported. min: scm default: scm:pfx=git ex1: scm:pfx=hash

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lu_semver-4.0.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file lu_semver-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: lu_semver-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.9

File hashes

Hashes for lu_semver-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 669335c9213cd2972e9003783765bda3a644b28b585bc80bc79c3146a16297ec
MD5 32b9de7b339a4f0afda2491f97bfe5c4
BLAKE2b-256 dd2fd8c5846f9cd11666785880aaac3ab48b7051383db665ceb37a8f920b0a83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page