diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-05-16 23:30:01 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-05-17 14:02:19 +0200 |
| commit | d69a00f7686978d69765d2677a6e53a7cd11bb74 (patch) | |
| tree | d0b22ea7146a74e132a0eeaa9708138fd645dff7 /build.sh | |
| parent | 34cac094b34db782648719db96c037621da99c08 (diff) | |
| download | mullvadvpn-d69a00f7686978d69765d2677a6e53a7cd11bb74.tar.xz mullvadvpn-d69a00f7686978d69765d2677a6e53a7cd11bb74.zip | |
Add check for signing variables in build.sh
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -25,9 +25,25 @@ if [[ "${1:-""}" != "--allow-dirty" ]]; then fi fi -case "$(uname -s)" in - Darwin*) export MACOSX_DEPLOYMENT_TARGET="10.7";; -esac +if [[ "$(uname -s)" = "Darwin" ]]; then + export MACOSX_DEPLOYMENT_TARGET="10.7" + + # if CSC_LINK is set, then we do signing + if [[ ! -z ${CSC_LINK-} ]]; then + echo "Building with macOS signing activated. Using certificate at $CSC_LINK" + if [[ -z ${CSC_KEY_PASSWORD-} ]]; then + read -sp "CSC_KEY_PASSWORD = " CSC_KEY_PASSWORD + echo "" + export CSC_KEY_PASSWORD + fi + export CSC_IDENTITY_AUTO_DISCOVERY=true + else + echo "!! CSC_LINK not set. This build will not be signed !!" + unset CSC_LINK CSC_KEY_PASSWORD + export CSC_IDENTITY_AUTO_DISCOVERY=false + fi +fi + # Remove binaries. To make sure it is rebuilt with the stable toolchain and the latest changes. cargo +stable clean |
