From 4d36fa0c0e962bcc5a53416a5182418264cc9c14 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 17 Mar 2022 18:56:36 +0100 Subject: [PATCH] Add --always parameter to git describe --- README.md | 4 ++-- gitdch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 97371b4..c1ce852 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ 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 --tags'' command. +numbered using ''git describe --always --tags'' command. # Installation @@ -51,7 +51,7 @@ optional arguments: -n PACKAGE_NAME, --package-name PACKAGE_NAME Package name -V VERSION, --version VERSION - Currrent version (default: autodetected using git describe --tags) + Currrent version (default: autodetected using git describe --always --tags) --version-suffix VERSION_SUFFIX Suffix for autodetected version -c CODE_NAME, --code-name CODE_NAME diff --git a/gitdch b/gitdch index f88d48d..db4d066 100755 --- a/gitdch +++ b/gitdch @@ -79,7 +79,7 @@ parser.add_argument( '--version', type=str, dest='version', - help='Currrent version (default: autodetected using git describe --tags)' + help='Currrent version (default: autodetected using git describe --always --tags)' ) parser.add_argument( @@ -176,7 +176,7 @@ def add_version(): tag = None version_commit = None -version = options.version or clean_deb_version(repo.git.describe('--tags')) +version = options.version or clean_deb_version(repo.git.describe('--always', '--tags')) messages = [] for commit in repo.iter_commits(): if version_commit is None: