mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
3ac8494d23
git-subtree-dir: orbit git-subtree-mainline:d5974aad97
git-subtree-split:ab3047bb39
26 lines
476 B
Bash
Executable File
26 lines
476 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
if [ -z "$CODESIGN_IDENTITY" ]
|
|
then
|
|
echo 'Must set CODESIGN_IDENTITY in environment'
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f "$1" ]
|
|
then
|
|
echo 'First argument must be path to binary'
|
|
exit 1
|
|
fi
|
|
|
|
# Skip if not a macOS Mach-O executable
|
|
if ! ( file "$1" | grep Mach-O )
|
|
then
|
|
echo 'Skip macOS signing'
|
|
exit 0
|
|
fi
|
|
|
|
codesign -s "$CODESIGN_IDENTITY" -i com.fleetdm.orbit -f -v --timestamp --options runtime "$1"
|
|
|
|
echo "Signed successfully"
|