summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/make-tarball2
-rwxr-xr-xtools/read-version2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/make-tarball b/tools/make-tarball
index 91c45624..3197689f 100755
--- a/tools/make-tarball
+++ b/tools/make-tarball
@@ -35,7 +35,7 @@ while [ $# -ne 0 ]; do
done
rev=${1:-HEAD}
-version=$(git describe "--match=[0-9]*" ${long_opt} $rev)
+version=$(git describe --abbrev=8 "--match=[0-9]*" ${long_opt} $rev)
archive_base="cloud-init-$version"
if [ -z "$output" ]; then
diff --git a/tools/read-version b/tools/read-version
index ddb28383..d9ed30da 100755
--- a/tools/read-version
+++ b/tools/read-version
@@ -56,7 +56,7 @@ if os.path.isdir(os.path.join(_tdir, ".git")) and which("git"):
flags = []
if use_tags:
flags = ['--tags']
- cmd = ['git', 'describe', '--match=[0-9]*'] + flags
+ cmd = ['git', 'describe', '--abbrev=8', '--match=[0-9]*'] + flags
version = tiny_p(cmd).strip()