Merge pull request #421 from danielpunkass/new-build-script

Switch to using ditto to create the zip file, since the way I was doi…
This commit is contained in:
Brent Simmons 2018-09-01 16:04:16 -07:00 committed by GitHub
commit 2238ac8bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,7 @@ buildProductBundleName = "%s.app" % (buildProductName,)
# WARNING: This will be deleted and replaced during build. It must # WARNING: This will be deleted and replaced during build. It must
# correspond to a directory you are willing to see deleted often. # correspond to a directory you are willing to see deleted often.
buildDir = os.path.expanduser("~/.build2") buildDir = os.path.expanduser("~/.build")
# Remove previous build folder and re-create it # Remove previous build folder and re-create it
print("Removing existing build dir: %s" % buildDir) print("Removing existing build dir: %s" % buildDir)
@ -44,7 +44,9 @@ if os.path.exists(currentVersionZipPath):
print("Copying build product from \"%s\" to \"%s\"" % (currentVersionBuiltAppPath, currentVersionStagedAppPath)) print("Copying build product from \"%s\" to \"%s\"" % (currentVersionBuiltAppPath, currentVersionStagedAppPath))
subprocess.call(["ditto", currentVersionBuiltAppPath, currentVersionStagedAppPath]) subprocess.call(["ditto", currentVersionBuiltAppPath, currentVersionStagedAppPath])
print("Zipping to \"%s\"" % currentVersionZipName) print("Zipping to \"%s\"" % currentVersionZipName)
subprocess.call(["zip", "--symlinks", "-r", currentVersionZipPath, currentVersionBuiltAppPath])
# Documented in "man ditto" as creating an archive "similarly to the Finder's Compress functionality"
subprocess.call(["ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", currentVersionBuiltAppPath, currentVersionZipPath])
# Archive a permanent copy # Archive a permanent copy
archiveDir = os.path.expanduser("~/Archive/Releases") archiveDir = os.path.expanduser("~/Archive/Releases")