Fix source packaging.
[cdist.git] / cdist
diff --git a/cdist b/cdist
index 8ce2497fd3e474b898e89c5a2c31c5d8a43d8829..6011338daadae41f5479b405f8fb9fc168d785be 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -734,14 +734,13 @@ def notarize(dmg, bundle_id):
 
     def string_after(process, key):
         lines = p.stdout.decode('utf-8').splitlines()
-        request_uuid = None
         for i in range(0, len(lines)):
             if lines[i].find(key) != -1:
                 return lines[i+1].strip().replace('<string>', '').replace('</string>', '')
 
-        raise Error("Missing expected response %s from Apple" % key)
-
     request_uuid = string_after(p, "RequestUUID")
+    if request_uuid is None:
+        raise Error('No RequestUUID found in response from Apple')
 
     for i in range(0, 30):
         print('Checking up on %s' % request_uuid)
@@ -856,7 +855,7 @@ class SourceTarget(Target):
     def cleanup(self):
         rmtree(self.directory)
 
-    def package(self, project, checkout, output_dir, options):
+    def package(self, project, checkout, output_dir, options, no_notarize):
         tree = globals.trees.get(project, checkout, self)
         with TreeDirectory(tree):
             name = read_wscript_variable(os.getcwd(), 'APPNAME')
@@ -1151,8 +1150,8 @@ def main():
     parser_manual = subparsers.add_parser("manual", help="build the project's manual")
     parser_doxygen = subparsers.add_parser("doxygen", help="build the project's Doxygen documentation")
     parser_latest = subparsers.add_parser("latest", help="print out the latest version")
-    parser_latest.add_argument('--latest-major', help='major version to return', type=int)
-    parser_latest.add_argument('--latest-minor', help='minor version to return', type=int)
+    parser_latest.add_argument('--major', help='major version to return', type=int)
+    parser_latest.add_argument('--minor', help='minor version to return', type=int)
     parser_test = subparsers.add_parser("test", help="build the project and run its unit tests")
     parser_test.add_argument('--no-implicit-build', help='do not build first', action='store_true')
     parser_test.add_argument('--test', help="name of test to run, defaults to all")
@@ -1308,7 +1307,7 @@ def main():
                             t = s[1]
                         if len(t) > 0 and t[0] == 'v':
                             v = Version(t[1:])
-                            if (args.latest_major is None or v.major == args.latest_major) and (args.latest_minor is None or v.minor == args.latest_minor):
+                            if (args.major is None or v.major == args.major) and (args.minor is None or v.minor == args.minor):
                                 latest = v
 
         print(latest)