This feature is currently deprecated and will be remove in next major version of pipeline.
There are several ways for generating version strings. Basically, three types are available.
These are:
* `mtime <#modification-time-version>`_
* `hash <#hash-version>`_
* `git <#git-version>`_
Modification time version
=========================
This is the default method for generating version strings. In short, when invoked, it checks whether any of the source files system timestamps (mtime) is newer than the version string of the corresponding compressed file. If that is the case, the compressed output file version string will be the mtime of the most recent source file.
Hash version
============
Hash-based versioning works by generating a hash string based on the contents of the source files. Available hash-based versioning methods are MD5 and SHA-1.
MD5 version
-----------
To generate MD5 version strings, put this in your `settings.py` ::
Replace ``app`` and ``module`` by the app and module that contains your versioning class
Production environment
======================
You probably do not want the source files to be evaluated and (if needed)
regenerated on every request in a production environment.
Especially when calculating a hash on every request could be expensive.
To avoid this, make sure your source files are compressed before deployment,
and put the following settings in your production environment's ``settings.py``::
PIPELINE_AUTO = False
PIPELINE_VERSION = True
This way, the names of the compressed files will be looked up in the file system, instead of being evaluated and (if needed) regenerated on every request.