chiark / gitweb /
proper error message when publishing with the same app in repo and unsigned
authorMichael Pöhn <michael.poehn@fsfe.org>
Tue, 30 May 2017 12:53:54 +0000 (14:53 +0200)
committerMichael Pöhn <michael.poehn@fsfe.org>
Thu, 7 Sep 2017 10:19:48 +0000 (12:19 +0200)
fdroidserver/publish.py

index 1ca89e1558ce122eb4dc47845ef3cbe6d9d032e5..ad2009067041a1616aaadf3d12143af2bfff38aa 100644 (file)
@@ -194,6 +194,13 @@ def main():
                 if p.returncode != 0:
                     raise BuildException("Failed to generate key")
 
+            signed_apk_path = os.path.join(output_dir, apkfilename)
+            if os.path.exists(signed_apk_path):
+                raise BuildException("Refusing to sign '{0}' file exists in both "
+                                     "{1} and {2} folder.".format(apkfilename,
+                                                                  unsigned_dir,
+                                                                  output_dir))
+
             # Sign the application...
             p = FDroidPopen([config['jarsigner'], '-keystore', config['keystore'],
                              '-storepass:env', 'FDROID_KEY_STORE_PASS',