Simple python script to generate debian changelog file from git commits history
Find a file
2022-12-12 11:19:08 +01:00
debian CI: Add publishing (gitea version & debian package) 2022-05-01 01:23:05 +02:00
.gitignore CI: Add publishing (gitea version & debian package) 2022-05-01 01:23:05 +02:00
.pylintrc Restore compatibility with python 3.5 2022-11-24 11:09:41 +01:00
.woodpecker.yml CI: use brenard/aptly-publish image for publish-apt job 2022-08-01 23:16:12 +02:00
build.sh Add -R/--release-notes parameter 2022-08-01 19:52:29 +02:00
gitdch Add --revision parameter to allow to control the commits used to generate the changelog 2022-12-12 11:19:08 +01:00
README.md Add --always parameter to git describe 2022-03-17 18:56:36 +01:00

gitdch

Simple python script using GitPython library to generate debian changelog file from git commit history. Each existing tags is considered as a release version and current working version is numbered using ''git describe --always --tags'' command.

Installation

Dependencies

apt install git python3-git

Using git

git clone https://gogs.zionetrix.net/bn8/gitdch.git /usr/local/src/gitdch
ln -s /usr/local/src/gitdch/gitdch /usr/local/bin/gitdch

Using wget

wget -O /usr/local/bin/gitdch https://gogs.zionetrix.net/bn8/gitdch/raw/master/gitdch
chmod +x /usr/local/bin/gitdch

Using curl

curl -o /usr/local/bin/gitdch https://gogs.zionetrix.net/bn8/gitdch/raw/master/gitdch
chmod +x /usr/local/bin/gitdch

Usage

usage: gitdch [-h] [-d] [-v] [-w] [-l LOGFILE] [-q] [-p GIT_PATH] [-o OUTPUT] [-n PACKAGE_NAME] [-V VERSION] [--version-suffix VERSION_SUFFIX] [-c CODE_NAME] [-u URGENCY]

Generate Debian package changelog from git

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Show debug messages
  -v, --verbose         Show verbose messages
  -w, --warning         Show warning messages
  -l LOGFILE, --log-file LOGFILE
                        Log file path
  -q, --quiet           Quiet mode: do not log on console (only if log file is provided)
  -p GIT_PATH, --path GIT_PATH
                        Git repository path (default: ./)
  -o OUTPUT, --output OUTPUT
                        Generated Debian changelog output path (default: stdout)
  -n PACKAGE_NAME, --package-name PACKAGE_NAME
                        Package name
  -V VERSION, --version VERSION
                        Currrent version (default: autodetected using git describe --always --tags)
  --version-suffix VERSION_SUFFIX
                        Suffix for autodetected version
  -c CODE_NAME, --code-name CODE_NAME
                        Debian code name (default: unstable)
  -u URGENCY, --urgency URGENCY
                        Package urgency (default: medium)

Copyright (c) 2013-2022 Benjamin Renard brenard@zionetrix.net

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.