blob: d2eb5907b1d68d37ceb24ebb46f66d29de75b161 (
plain)
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
|
#!/usr/bin/env bash
# Buildscript to run inside a build VM to build a new IPA for the iOS app.
set -eu
# This single path really screws with XCode and wireguard-go's makefiles, which
# really do not like the whitespace. Thus, the build source is copied to a
# non-whitespaced `~/build`, built there and the resulting `MullvadVPN.ipa` is
# copied back.
VM_BUILD_DIR="/Volumes/My Shared Files/build"
security unlock-keychain -p 'build'
rm -rf ~/build
cp -r "$VM_BUILD_DIR" ~/build || true
cd ~/build/ios
rm -r Build
# Instantiate Xcconfig templates.
for file in ./Configurations/*.template ; do cp "$file" "${file//.template/}" ; done
IOS_PROVISIONING_PROFILES_DIR=~/provisioning-profiles \
PATH=/usr/local/go/bin:$PATH \
bash build.sh
cp "$HOME/build/ios/Build/MullvadVPN.ipa" "${VM_BUILD_DIR}/ios/Build/"
|