Skip to main content

Git Changelog Generator

Project description

README

GCG stands for Git Changelog Generator.

Rationale

Keeping a reasonable changelog is an invaluable asset for everyone who tries to track progress of a project or figure out whether their issue has or has not be fixed.

In Linux world, such changelogs are often embedded into packages, for example RPM has an optional section in the spec file (%changelog) and Debian versioning goes even further - it explicitly depends on a proper version information inside the changelog to build and maintain the package(s).

There are good reasons why the log is ideally maintained manually, you can read all about it at https://keepachangelog.com/en/

That said, it’s not all black and white. A couple of questions:

  • what if you spend a lot of work making sure your commit descriptions are telling the story; should this work be disregarded and repeated in the changelog?

  • what if the reality kicks in, project members keep forgetting to update the changelog (or it is “yet another menial task”)?

  • what if you need to maintain the log in multiple formats?

If advice from keepchangelog.com doesn’t address your questions, you don’t want to tie yourself to a specific Git manager (like Github, Gitlab, Bitbucket) and as a project you’re committed to maintain sensible Git commit descriptions - gcg might be just the fit for you.

Releases

At this point, gcg official packages are created and maintained only for Python; they’re available via PyPI index: https://pypi.org/project/gcg

That said, unofficial packages for most common distribution formats can be obtained from the following repositories:

To use the DEB packages from those repositories, you need to install the [Bintray GPG key](https://bintray.com/user/downloadSubjectPublicKey?username=weakcamel); otherwise your apt-get update will fail.

For example:

# either of:
curl -qL https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -

curl -qL https://bintray.com/user/downloadSubjectPublicKey?username=weakcamel | sudo apt-key add -

PIP

Only tagged packages are uploaded to https://pypi.org index, test versions will be made available under https://test.pypi.org/manage/project/gcg/releases/

TravisCI builds try to ensure the version (version.txt) is unique for each CI build by adding .dev<TRAVIS_BUILD_NUMBER> suffix for development versions of the package.

Build

Prerequisites:

Base:

  • python2.7

  • pip

  • virtualenv

To build RPMs:

  • rpmbuild

To build DEB packages you need to set up Debian toolchain, which is not in scope of this README.

Build

We recommend you build this package using virtualenv.

To set it up, run for example:

virtualenv venv
source venv/bin/activate

To test & build a binary Python package, use:

python setup.py test bdist

RPM:

python setup.py test bdist_rpm

DEB:

python setup.py --command-packages=stdeb.command bdist_deb

Usage

To see available options, run as:

$ gcg --help

Existing templates

The gcg module of the application comes with some default Jinja2 templates to render the changelog information.

Current implementation does not yet support using non-standard output templates. The anticipated design would to be pass a template directory as a command-line argument, that’s still to be determined though.

DEB template

Based on https://www.debian.org/doc/debian-policy/#s-dpkgchangelog

RPM template

Based on one of allowed formats listed at https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Changelogs

Project details


Download files

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

Source Distribution

gcg-0.2.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

gcg-0.2.0-py2-none-any.whl (11.8 kB view details)

Uploaded Python 2

File details

Details for the file gcg-0.2.0.tar.gz.

File metadata

  • Download URL: gcg-0.2.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.12

File hashes

Hashes for gcg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7d671dd7d6656e4e6af7c9b8aa3643c5a71cb989197ce0e45156d406f6b8938f
MD5 9cc36ef1ffb09b95cab15620fd5b8304
BLAKE2b-256 76d14b99ee88dcca0f7ee4ae18779edbe750bd0be3e578a7524c68889956183e

See more details on using hashes here.

File details

Details for the file gcg-0.2.0-py2-none-any.whl.

File metadata

  • Download URL: gcg-0.2.0-py2-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.12

File hashes

Hashes for gcg-0.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 abe22ec1237e71099dc31805a85bc69823b4d9dcf2e385965eb072c20d8bce5a
MD5 ca33a348c4633b9c5443ccae163198f7
BLAKE2b-256 fb20763064757de41be1eab6721f06d4571d83fef9013a24ec0fc6332d34c823

See more details on using hashes here.

Supported by

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