summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-07-15 16:21:36 +0100
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-07-15 16:29:40 +0100
commita55f642cd3e2d7e330cf96ff9f9eb5d03ae39192 (patch)
treed283a8e4b0835fba6ffda444d979c9b348c1bb73
parent11ec0d4026cbbaa3850fc88e2a8d46ef5248cf7a (diff)
downloadlorry-a55f642cd3e2d7e330cf96ff9f9eb5d03ae39192.tar.gz
Don't include extension in tag if present
For example, we'd rather the tag be docbook-xml-4.5 than docbook-xml-4.5.zip Change-Id: I617b1c577ff95e4231681c75d3a91f4826cafd2b
-rwxr-xr-xlorry.zip-importer5
1 files changed, 4 insertions, 1 deletions
diff --git a/lorry.zip-importer b/lorry.zip-importer
index d2d5493..5524834 100755
--- a/lorry.zip-importer
+++ b/lorry.zip-importer
@@ -11,6 +11,7 @@
## git log --stat import-zips
from os import popen, path
+from os.path import splitext
from sys import argv, exit, hexversion, stderr
from time import mktime
from zipfile import ZipFile
@@ -74,7 +75,9 @@ for zipfile in argv[1:]:
fast_import.write('M 100644 ' + mark[name] + ' ' +
name[len(common_prefix):] + "\n")
- printlines(('', 'tag ' + path.basename(zipfile), \
+ zipname, _ = splitext(zipfile_basename)
+
+ printlines(('', 'tag ' + zipname, \
'from ' + branch_ref, 'tagger ' + committer, \
'data <<EOM', 'Package ' + zipfile, 'EOM', ''))