Skip to content

Commit 4c98c83

Browse files
osyosy
authored andcommitted
scripts: add resign script
1 parent 7bc4fdd commit 4c98c83

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

scripts/resign.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
3+
if [ $# -ne 4 ]; then
4+
echo "usage: $0 UTM.xcarchive PROFILE_NAME TEAM_ID outputPath"
5+
exit 1
6+
fi
7+
8+
INPUT=$1
9+
PROFILE_NAME=$2
10+
TEAM_ID=$3
11+
OUTPUT=$4
12+
OPTIONS="/tmp/options.plist"
13+
14+
cat >"$OPTIONS" <<EOL
15+
<?xml version="1.0" encoding="UTF-8"?>
16+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
17+
<plist version="1.0">
18+
<dict>
19+
<key>compileBitcode</key>
20+
<false/>
21+
<key>method</key>
22+
<string>development</string>
23+
<key>provisioningProfiles</key>
24+
<dict>
25+
<key>com.osy86.UTM</key>
26+
<string>${PROFILE_NAME}</string>
27+
</dict>
28+
<key>signingStyle</key>
29+
<string>manual</string>
30+
<key>stripSwiftSymbols</key>
31+
<true/>
32+
<key>teamID</key>
33+
<string>${TEAM_ID}</string>
34+
<key>thinning</key>
35+
<string>&lt;none&gt;</string>
36+
</dict>
37+
</plist>
38+
EOL
39+
40+
xcodebuild -exportArchive -exportOptionsPlist "$OPTIONS" -archivePath "$INPUT" -exportPath "$OUTPUT"
41+
rm "$OPTIONS"

0 commit comments

Comments
 (0)