Skip to main content
====
chag
====

*chag* stands for "changelog tag". It allows you to use your project's
changelog as the canonical source of change data.

.. image:: https://travis-ci.org/mtdowling/chag.svg?branch=master
:target: https://travis-ci.org/mtdowling/chag
:alt: Build status

What does it do?
----------------

1. Parse the contents of a specific changelog entry by tag name.
2. Create annotated git tags based on a changelog entry.
3. List all available tag version numbers in a changelog.
4. Get the tag number of the latest changelog entry in a changelog.
5. In-place update a WIP changelog entry with an actual version number.
6. Easily append to the latest changelog entry with support for automatic issue
and commit linking.

Why use chag?
-------------

1. Your project's GitHub releases atom feed contains release notes that can be
used to keep consumers of your project up to date. Take a look at
`chag's atom feed <https://github.com/mtdowling/chag/releases.atom>`_ for
an example.
2. If you use `Travis CI's deploy feature <http://docs.travis-ci.com/user/deployment/releases/>`_
to automatically deploy to GitHub releases, then the contents of your GitHub
releases will mirror the contents of the corresponding changelog entry.
3. Helps to ensure your changelog is always up to date.

Workflow
--------

While you can use any of the commands of chag as needed, the recommended
chag workflow is:

1. As you develop changes, add to your changelog file under a changelog
section titled ``Next Release``.
2. As you develop features, append items to your changelog using
``chag append``.
3. When your work is ready to be released, execute
``chag update -m 'X.Y.Z ()'`` where X.Y.Z is the version of the
next tagged release and ``()`` is expanded to the current date. This
command updates the "Next Release" entry in place with the new version
number and date.
4. Review the changes and commit them.
5. Run ``chag tag `` to create an annotated git tag for the latest version.

Installation
------------

::

pip install chag

Changelog Format
----------------

chag expects changelog files to match the following template:

1. Any number of lines can precede the start of the actual changelog entries
(e.g., title, description of the file, etc.).
2. Each changelog entry MUST start with a heading line that can take any form.
3. After each heading line is a border line (a continuous number of repeated
characters used to demarcate headings in markdown or reStructuredText),
followed by another empty new line. The border line must be the same length
as the preceding heading line.
4. Next is the changelog content. This can be any free-form text. chag will
consume the content until the heading regular expression matches the
next entry or the end of the file.

Example Changelog
~~~~~~~~~~~~~~~~~

::

=========
CHANGELOG
=========

Any text can occur before the actual release not entries are found.

Next Release
------------

* I've been building up this release while developing.
* This helps to ensure the changelog is up to date.

1.0.1 (2014-09-10)
------------------

Optional description of the release notes.

* Updated something or another.
* Here is another bullet point.

1.0.1 (2014-09-01)
------------------

* Some bullet point data.

See chag's `CHANGELOG.rst <https://github.com/mtdowling/chag/blob/master/CHANGELOG.rst>`_
file for more examples.

Metadata

Release files for chag 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chag 0.5.0
File Size Uploaded
chag-0.5.0.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chag 0.5.0
File Interpreter ABI Platform
chag-0.5.0-py2-none-any.whl Python 2 none any Details

Total release size: 17.3 kB

Release files / chag-0.5.0.tar.gz

Download URL chag-0.5.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d6c6847953398644dbe4127fdf71eca72dda2588a51a72c4d6cbeccb96f189b7
BLAKE2b-256 checksum
How to use checksums
e2cfc1ea67e7a79d585bf99795269084db2c91237e994c7e2dc31be25e786327
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / chag-0.5.0-py2-none-any.whl

Download URL chag-0.5.0-py2-none-any.whl
Size 9.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
4a8064355d24be6fbcb75c6d4e148cf1201a9dcd86665670f53015bf7221b334
BLAKE2b-256 checksum
How to use checksums
21e3222739f8c6d2571ca47a5486deec11c943f2c72ee2156b41fd79e336a273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page