Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

A simple, python-based versioning tool.

Project Description
========
Verpy
========

A dead simple versioning tool.
------------------------------------

New in 0.4.0:

- Made verpy a wheel package.
- Some README changes.

New in 0.3.0:

- Added -c option : Print concise and clear version number for piping with other commands.
- Reworded change logs.
- Added some examples in README.


Verpy can not only increase/decrease those version numbers,
but also reset them with a given version string at a time.
(String should fully match regex ``'\d+(.\d+)+'``)

By default, verpy opens ``__init__.py`` in current working
directory looking for version number. You may specify the
file path including version numbers with -f.

Verpy finds a string match ``'\d+(.\d+)+)'`` and turns it into an int list.
After modifying version number, verpy turns the list back to string,
replaces old version string by using str.replace(), and rewrites the file.

Verpy follows `Semantic Version 2.0 <http://semver.org/>`_,
and will become its super set by accepting from x.y to x.y.z.whatever.version versioning pattern. No matter what prefix or suffix next to the version numbers, verpy will work properly.
But handling pre-release versioning is not considered now. The pre-release versioning feature will be added after a while.

Getting started:
================

1. First, make sure python3-docopt installed:
(Use virtualenv if necessary.)

.. code-block:: bash

sudo pip3 install -U docopt

2. Then rename verpy.py to verpy, give it executable access, and move to $PATH:

.. code-block:: bash

git clone https://github.com/EriCSN/verpy.git
cd verpy/verpy
chmod u+x ./ver.py
sudo cp ./ver.py /usr/local/bin/verpy

Done. You can happy versioning now!

Examples:
=========

These commands is tested under Ubuntu.

Using -t for tesing:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

verpy -c
verpy -s
verpy -t -M 1
verpy -t -m 1
verpy -t -p 20
verpy -t -v -R '0.0.1'
verpy -t -f ./verpy.py -R '1.0.0'

Quicker methods to reset numbers to 0:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash

verpy -t -M 0 #Reset numbers after major version.
verpy -t -m 0 #Reset numbers after minor version.
verpy -t -p 0 #Reset numbers after patch version.

Using verpy with git:
~~~~~~~~~~~~~~~~~~~~~
After committing new version changes, you may add
version tag by following commands:

.. code-block:: bash

git tag -a `verpy -c` -m "Update version numbers."


Pipeline style:

.. code-block:: bash

verpy -c | xargs git tag -m "Other method to use verpy with git." -a

Requirements:
=============

* Python3.4+
* docopt >= 0.6



Roadmap:
========

- Write unit tests.
- Make a wheel. (?
- Add pre-release versioning support.


Licensing:
==========
---------------------------------

Verpy is released under the MIT License same with `docopt's <https://github.com/docopt/docopt/blob/master/LICENSE-MIT>`_.
Release History

Release History

This version
History Node

0.4.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
verpy-0.4.0-py3-none-any.whl (7.0 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Nov 15, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting