summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2015-07-23 13:43:16 -0500
committerDavid McMackins II <contact@mcmackins.org>2015-07-23 13:43:16 -0500
commit37693fca31b9e5af6168bc2ee5003a0216e678f8 (patch)
treeb37428ce2856c64c09e7a87c9f390207800d89d3
parent910553c98e6cae93317c3fb3701127f903339af0 (diff)
Now removing signature and checksum files so that fat jars don't fail authenticity check
-rw-r--r--jarsnap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/jarsnap.py b/jarsnap.py
index 7741b4f..e1cebd1 100644
--- a/jarsnap.py
+++ b/jarsnap.py
@@ -18,14 +18,14 @@
from datetime import datetime
from getopt import gnu_getopt, GetoptError
-from os import mkdir, remove, rename
+from os import listdir, mkdir, remove, rename
from os.path import join, exists
from shutil import rmtree, make_archive, unpack_archive
from sys import argv
from tempfile import gettempdir
__title__ = 'jarsnap.py'
-__version__ = '1.0.4'
+__version__ = '1.0.5'
__author__ = 'David McMackins II'
def make_fat_jar(jars, main_class, output_path='fat.jar'):
@@ -40,6 +40,10 @@ def make_fat_jar(jars, main_class, output_path='fat.jar'):
for jar in jars:
unpack_archive(jar, workdir, 'zip')
+ for f in listdir(meta_inf):
+ if f.endswith('.SF') or f.endswith('.DSA') or f.endswith('.RSA'):
+ remove(join(meta_inf, f))
+
with open(join(meta_inf, 'MANIFEST.MF'), 'w') as mf:
mf.write('Manifest-Version: 1.0\r\n'
+ 'Created-By: {} {}\r\n'.format(__title__, __version__)