mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-17 03:15:53 +08:00
Update environment variables
CURA-8849
This commit is contained in:
parent
cf9033498b
commit
4ed16881ac
@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
|
||||||
|
|
||||||
SOURCE_DIR = os.environ.get("SOURCE_DIR", "..")
|
SOURCE_DIR = os.environ.get("SOURCE_DIR", "..")
|
||||||
DIST_DIR = os.environ.get("DIST_DIR", os.path.join(SOURCE_DIR, "dist"))
|
DIST_DIR = os.environ.get("DIST_DIR", os.path.join(SOURCE_DIR, "dist"))
|
||||||
@ -29,7 +28,7 @@ def build_dmg() -> None:
|
|||||||
|
|
||||||
def sign(file_path: str) -> None:
|
def sign(file_path: str) -> None:
|
||||||
codesign_executable = os.environ.get("CODESIGN", "codesign")
|
codesign_executable = os.environ.get("CODESIGN", "codesign")
|
||||||
codesign_identity = os.environ.get("CODESIGN_IDENTITY", "A831301292FC30F84F3C137F2141401620EE5FA0")
|
codesign_identity = os.environ.get("CODESIGN_IDENTITY")
|
||||||
|
|
||||||
arguments = [codesign_executable,
|
arguments = [codesign_executable,
|
||||||
"-s", codesign_identity,
|
"-s", codesign_identity,
|
||||||
@ -41,8 +40,8 @@ def sign(file_path: str) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def notarize() -> None:
|
def notarize() -> None:
|
||||||
notarize_user = os.environ.get("NOTARIZE_USER")
|
notarize_user = os.environ.get("MAC_NOTARIZE_USER")
|
||||||
notarize_password = os.environ.get("NOTARIZE_PASSWORD")
|
notarize_password = os.environ.get("MAC_NOTARIZE_PASSWORD")
|
||||||
altool_executable = os.environ.get("ALTOOL_EXECUTABLE", "altool")
|
altool_executable = os.environ.get("ALTOOL_EXECUTABLE", "altool")
|
||||||
|
|
||||||
arguments = [
|
arguments = [
|
||||||
@ -58,14 +57,9 @@ def notarize() -> None:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
|
||||||
os.rename(os.path.join(DIST_DIR, "Ultimaker-Cura"), os.path.join(DIST_DIR, "Ultimaker-Cura.app"))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
sign(APP_PATH)
|
|
||||||
build_dmg()
|
build_dmg()
|
||||||
sign(DMG_PATH)
|
sign(DMG_PATH)
|
||||||
|
|
||||||
# notarize_dmg = bool(os.environ.get("NOTARIZE_DMG", "TRUE"))
|
notarize_dmg = bool(os.environ.get("NOTARIZE_DMG", "TRUE"))
|
||||||
# if notarize_dmg:
|
if notarize_dmg:
|
||||||
# notarize()
|
notarize()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user