Package: ongeza
IndexIntroduction|Requirements|Motivation|Usage|Installation|Project Structure|Design Principles|Limitations|Scripts|Contributing|LicenseIntroductionongeza (Swahili for “increase”) is a Pythoncommand line application(CLI)
that makes following theSemantic Versioning Specificationa breeze.
If called with no options,ongezawill print the repo’s current git tag
version. With ongeza, you canQuickly bump to apatch,minor, ormajorversionStash uncommitted changes before bumpingCreate a git tag with the new version numberBump python, php, and javascript projectsand much more…Requirementsongeza has been tested and is known to work on Python 2.7, 3.4, and 3.5;
and PyPy 4.0MotivationI think we can all agree thatsemveris awesome sauce. But while
coding, who has time to constantly look up the current version and figure out
the new version? I created ongeza to relieve myself from this pain of having to
worry about version numbers. For example, to bump to aminorversion
inside a pythongitrepo, simply type:ongeza--type=minorOr via the short option style:ongeza-tnAs long as the repo contains a git tag with the current version, ongeza will
automagically:calculate the new version numberfigure out which file(s) to update with the new version numbermake the appropriate updates and commit the changescreate a git tag with the new version numberUsageongeza is intended to be used from the command line.ongeza[options]<dir>Basic Examplesshow helpongeza-husage:ongeza[options]<dir>description:ongezamakesfollowingtheSemanticVersioningSpecificationabreeze.Ifcalledwithnooptions,ongezawillprintthecurrentgitrepository'stagversion.If<dir>isnotspecified,thecurrentdirisused.positionalarguments:dirtheprojectdirectory(default:/Users/reubano/Documents/Projects/ongeza).optionalarguments:-h,--helpshowthishelpmessageandexit-tTYPE,--typeTYPEversionbumptype,mustbeoneof:mormajor:[x].0.0norminor:x.[y].0porpatch:x.y.[z]-sVERSION,--setVERSIONsetarbitraryversionnumber-S,--skip-commitskipcommittingversionbumpedfiles-T,--tagcreategittagatHEADwiththebumpedversionnumber-p,--pushpushtotheremoteorigin-a,--stashstashuncommittedchanges-fFORMAT,--tag-formatFORMATgittagformat-FFORMAT,--tag-msg-formatFORMATgittagmessageformat-cFORMAT,--commit-msg-formatFORMATgitcommitmessageformat-g,--signmakeaGPG-signedtag(implies`--tag`)-iFILE,--fileFILEtheversionedfile-v,--versionShowversionandexit.-V,--verboseincreaseoutputverbosityview current versionongezabump to a `minor` versionongeza--type=minororongeza-tnmanually set a versionongeza--set1.0.2orongeza-s1.0.2bump to a `major` version and add a git tagongeza--tag--type=majororongeza-Ttmstash uncommitted changes and bump to a `patch` versionongeza--stash--type=patchorongeza-atpAdvanced Examplesbump to a `major` version and add a GPG signed git tagongeza--sign--type=majororongeza-gtmbump `weird.file` to a `minor` version and use custom formatsongeza-tn--file='weird.file'--tag-format='{version}'--commit-msg-format='New version: {version}'bump a remote directory to a `minor` version and use a custom tag message formatongeza-tn--tag-msg-format='Release: {version}'/path/to/remote/dirInstallationAt the command line, install ongeza using eitherpip(recommended)pipinstall--userongezaor (if you must)easy_installeasy_installongezaProject structure┌──CHANGES.rst├──CONTRIBUTING.rst├──INSTALLATION.rst├──LICENSE├──MANIFEST.in├──Makefile├──README.rst├──bin│└──ongeza├──ongeza│├──__init__.py│├──git_utils.py│├──main.py│└──shell_utils.py├──dev-requirements.txt├──helpers│├──check-stage│├──clean│├──docs│├──pippy│├──srcdist│└──wheel├──manage.py├──requirements.txt├──setup.cfg├──setup.py├──tests│├──__init__.py│├──standard.rc│├──test.py│└──test_ongeza.py└──tox.iniDesign PrinciplesKISS: Keep it simple, stupidDo one thing (version bumping), and do it wellSupport the most common file types used for project versioning, e.g.,__init__.py,package.json, etc.Limitationsno built-in support for pre-release or build numbers, e.g.,
- 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92
- 1.0.0+build.1, 1.3.7+build.11.e0f985aScriptsongeza comes with a built in task managermanage.pySetuppipinstall-rdev-requirements.txtExamplesRun python linter and nose testsmanagelintmanagetestContributingPlease mimic the coding style/conventions used in this repo.
If you add new classes or functions, please add the appropriate doc blocks with
examples. Also, make sure the python linter and nose tests pass.Please see thecontributing docfor more details.Licenseongeza is distributed under theMIT License.