Only put version file in jars.
R=ricow@google.com
Change-Id: I8bbcbe3c49cfc551861c9db130186245443d97a7
diff --git a/tools/archive.py b/tools/archive.py
index 2e83649..e5d25de 100755
--- a/tools/archive.py
+++ b/tools/archive.py
@@ -99,8 +99,9 @@
file_name = os.path.basename(file)
tagged_jar = os.path.join(temp, file_name)
shutil.copyfile(file, tagged_jar)
- with zipfile.ZipFile(tagged_jar, 'a') as zip:
- zip.write(version_file, os.path.basename(version_file))
+ if file_name.endsWith('.jar'):
+ with zipfile.ZipFile(tagged_jar, 'a') as zip:
+ zip.write(version_file, os.path.basename(version_file))
destination = GetUploadDestination(version, file_name, is_master)
print('Uploading %s to %s' % (tagged_jar, destination))
utils.upload_file_to_cloud_storage(tagged_jar, destination)