Revision: 12258
          http://sourceforge.net/p/skim-app/code/12258
Author:   hofman
Date:     2021-04-05 22:12:47 +0000 (Mon, 05 Apr 2021)
Log Message:
-----------
Add option to build script for archive type

Modified Paths:
--------------
    trunk/build_skim.py

Modified: trunk/build_skim.py
===================================================================
--- trunk/build_skim.py 2021-04-05 21:41:30 UTC (rev 12257)
+++ trunk/build_skim.py 2021-04-05 22:12:47 UTC (rev 12258)
@@ -9,7 +9,7 @@
 
 #
 # SYNOPSIS
-#   build_skim.sh [-i identity] [-u username] [-p password] [-o out]
+#   build_release.sh [-i identity] [-u username] [-p password] [-o out] [-a 
zip|dmg|]
 #
 # OPTIONS
 #   -i --identity
@@ -19,7 +19,9 @@
 #   -p, --password
 #       Password for notarization, defaults to @keychain:AC_PASSWORD
 #   -o, --out
-#      Output directory for the final zip and appcast, defaults to the user's 
Desktop
+#      Output directory for the final archive and appcast, defaults to the 
user's Desktop
+#   -a, --archive
+#      The type of archive the app bundle is wrapped in, the prepared disk 
image when empty
 #
 
 #
@@ -437,9 +439,10 @@
     username = ""
     password = "@keychain:AC_PASSWORD"
     out = os.path.join(os.getenv("HOME"), "Desktop")
+    archive = ""
     
     try:
-        opts, args = getopt.getopt(sys.argv[1:], "i:u:p:o:", ["identity=", 
"username=", "password=", "out="])
+        opts, args = getopt.getopt(sys.argv[1:], "i:u:p:o:a:", ["identity=", 
"username=", "password=", "out=", "archive="])
     except:
         sys.stderr.write("error reading options\n")
     
@@ -452,12 +455,14 @@
             password = arg
         elif opt in ["-o", "--out"]:
             out = arg
+        elif opt in ["-a", "--archive"]:
+            archive = arg
     
-    return identity, username, password, out
+    return identity, username, password, out, archive
 
 if __name__ == '__main__':
     
-    identity, username, password, out = get_options()
+    identity, username, password, out, archive = get_options()
     
     clean_and_build()
     
@@ -468,7 +473,10 @@
     
     new_version, new_version_string, minimum_system_version = read_versions()
     
-    archive_path = create_dmg_of_application(new_version_string, False)
+    if archive == "zip":
+        archive_path = create_zip_of_application(new_version_string)
+    else:
+        archive_path = create_dmg_of_application(new_version_string, archive 
== "dmg")
     
     # will bail if any part fails
     if username != "":

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to