@@ -6,13 +6,14 @@ get_uuid() {
6
6
strings " $1 " | grep -E -o ' [0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}'
7
7
}
8
8
9
- # Build Documentatation @ https://developer.apple.com/forums/thread/737894
9
+ # Build Documentation @ https://developer.apple.com/forums/thread/737894
10
10
11
11
XCODE_PROVISIONING_PROFILES_DIR=" $HOME /Library/Developer/Xcode/UserData/Provisioning Profiles"
12
12
ALT_PROVISIONING_PROFILES_DIR=" $HOME /Library/MobileDevice/Provisioning Profiles"
13
13
mkdir -p " $XCODE_PROVISIONING_PROFILES_DIR "
14
14
mkdir -p " $ALT_PROVISIONING_PROFILES_DIR "
15
- CODE_SIGN_IDENTITY=" Developer ID Application: Coder Technologies Inc (4399GN35BJ)"
15
+ APPLE_TEAM_ID=" 4399GN35BJ"
16
+ CODE_SIGN_IDENTITY=" Developer ID Application: Coder Technologies Inc (${APPLE_TEAM_ID} )"
16
17
17
18
APP_PROVISIONING_PROFILE_ID=$( get_uuid " $APP_PROF_PATH " )
18
19
EXT_PROVISIONING_PROFILE_ID=$( get_uuid " $EXT_PROF_PATH " )
@@ -37,4 +38,22 @@ xcodebuild \
37
38
CODE_SIGN_IDENTITY=" $CODE_SIGN_IDENTITY " \
38
39
OTHER_CODE_SIGN_FLAGS=' --timestamp' | LC_ALL=" en_US.UTF-8" xcpretty
39
40
40
- ditto " $( find " $HOME /Library/Developer/Xcode/DerivedData" -name " Coder Desktop.app" ) " " ./build/Coder Desktop.app"
41
+ app_path=" $( find " $HOME /Library/Developer/Xcode/DerivedData" -name " Coder Desktop.app" ) "
42
+
43
+ create-dmg \
44
+ --identity=" $CODE_SIGN_IDENTITY " \
45
+ " $app_path " \
46
+ ./
47
+
48
+ mkdir build
49
+ mv ./Coder\ Desktop* .dmg " ./build/Coder Desktop.dmg"
50
+
51
+ xcrun notarytool store-credentials " notarytool-credentials" \
52
+ --apple-id " $APPLE_ID " \
53
+ --team-id " $APPLE_TEAM_ID " \
54
+ --password " $APPLE_ID_PASSWORD "
55
+
56
+ # xcrun notarytool submit "Coder Desktop.dmg" --keychain-profile "notarytool-credentials" --wait
57
+
58
+ # xcrun stapler staple "Coder Desktop.dmg"
59
+ # xcrun stapler staple "$app_path"
0 commit comments