-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsign_app.sh
More file actions
executable file
·43 lines (34 loc) · 995 Bytes
/
sign_app.sh
File metadata and controls
executable file
·43 lines (34 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh
if [ "$#" -ne 1 ] ; then
echo "Usage: $0 signing_identity" >&2
exit 1
fi
signing_identity=$1
echo "Signing Identify set as: '$signing_identity'"
rm -Rf target/
mkdir target
cp -R apps target/
pushd target/
find . -name .DS_Store -delete
find . -name *~ -delete
popd
echo "Signing with developer id using provided Signing Identity"
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"
# shell script
codesign -s "$signing_identity" -v target/apps/shell-script/HelloWorld.app/
OUT=$?
if [ $OUT -eq 0 ];then
echo "developer id signing completed successfully."
else
echo "developer id signing failed, failing build."
exit $OUT
fi
# objective c
codesign -s "$signing_identity" -v target/apps/objective-c/HelloWorld.app/
OUT=$?
if [ $OUT -eq 0 ];then
echo "developer id signing completed successfully."
else
echo "developer id signing failed, failing build."
exit $OUT
fi