-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathbuild-product.sh
More file actions
executable file
·37 lines (28 loc) · 873 Bytes
/
Copy pathbuild-product.sh
File metadata and controls
executable file
·37 lines (28 loc) · 873 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
#!/bin/bash
echo "compiling...";
export OPENSSL_LIB_DIR=/usr/local/opt/openssl/lib
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
export OPENSSL_STATIC=true
cargo clean;
cargo build --release;
if [ $? -eq 0 ]
then
echo "copying files...";
cp target/release/Tickeys Tickeys.app/Contents/MacOS/;
rm -rf Tickeys.app/Contents/SharedSupport;
cp -r SharedSupport Tickeys.app/Contents/;
ver=`fgrep "version" -m 1 Cargo.toml | cut -d\" -f2`;
echo "updating version string... $ver";
plutil -replace CFBundleVersion -string "$ver" Tickeys.app/Contents/Info.plist;
else
echo "error: cargo build";
exit -1;
fi
if [ -z "$DEVELOPER_ID" ]
then
echo "Please set your DEVELOPER_ID envar first!";
exit -1;
fi
echo "codesigning with DEVELOPER_ID=$DEVELOPER_ID";
codesign --force --sign "Developer ID Application: $DEVELOPER_ID" Tickeys.app;
echo "completed.";