This resolves issues with weird `status-go` build errors like:
```
cgo: C compiler "2022-09-07" not found: exec: "2022-09-07": executable file not found in $PATH
```
Such errors are caused by `xcrun` spewing warnings to `stdout`. The PR
to fix this issue permanently has been created but it might take a while
before it's merged.
Fix PR: https://github.com/golang/mobile/pull/84
Resolves: https://github.com/status-im/status-mobile/issues/13949
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Otherwise the upload fails with `400 Bad Request` due to size:
```
bundler: failed to load command: fastlane (/Users/jenkins/.bundle/ruby/2.7.0/bin/fastlane)
/Users/jenkins/.bundle/ruby/2.7.0/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:249:in `exception_with_response': 400 Bad Request (RestClient::BadRequest)
```
Because release builds are over 100 MB:
```
> ls -l StatusIm-Mobile-v1.20.0-59567a.ipa
-rw-r--r-- 1 jakubgs jakubgs 104M Sep 7 15:50 StatusIm-Mobile-v1.20.0-59567a.ip
```
And the Diawi free account limit is 75 MB:
https://www.diawi.com/features-services
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This was a tricky one :P
removing un-necessary check of new-ui?
this is a better solution
The core issue was that when new-ui? was passed instead of the actual value just the key was passed
Some systems don't have jq installed, and using something like
`nix-shell` in the shebang would make this script noticeably slower.
We're not using `grep` because it lacks `-P` flag on MacOS.
Resolves: https://github.com/status-im/status-mobile/issues/13322
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Because otherwise when piping optput to `tee` the exit code that
affects the result of the whole `sh` call is the last command in the pipe.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Otherwise we get weird failures like these:
```
clang-11: error: cannot use 'cpp-output' output with multiple -arch options
clang-11: error: invalid argument '-mmacos-version-min=10.12' not allowed with '-miphoneos-version-min=8.0'
clang-11: error: invalid argument '-mmacos-version-min=10.12' not allowed with '-miphoneos-version-min=8.0'
```
Depends on: https://github.com/status-im/status-jenkins-lib/pull/47
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Possible fix for errors like:
```
bundler: failed to load command: fastlane (/Users/jenkins/.bundle/ruby/2.7.0/bin/fastlane)
/Users/jenkins/.bundle/ruby/2.7.0/gems/fastlane-2.205.2/fastlane_core/lib/fastlane_core/ui/interface.rb:153:in `shell_error!': [!] Shell command exited with exit status 51 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
```
Signed-off-by: Jakub Sokołowski <jakub@status.im>