LoginSignup
3
2

More than 3 years have passed since last update.

目的

BitriseでGitHubやAppCenterなど、別サービスに連携するためにAPIを叩くケースがよくある。
もちろんJsonで結果が返却されるので、jqで処理したい!
BitriseのAndroid/iOSで対応できるようにインストールしよう!

やり方

手元のmacだけならば、「Homebrewで終わりやん!」ってなるんですが、Bitriseでビルドするとそんな簡単に話は終わらない。

BitriseはAndroidとiOSのビルド環境が用意されている。(Xamarinとかももちろん用意されている。)
どちらもMacが環境として選択されていれば問題ないが、弊社の場合はそれぞれUbuntuとMacが設定されているのでそれぞれに対応する必要がある。

Mac

MacはHomebrewでインストールする。

if hash jq 2>/dev/null; then
  echo "jq already installed."
else
  echo "jq is not installed. Installing..."
  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  brew install jq
fi

Ubuntu

Ubuntuはaptでデフォルトで入っているのでそのままインストールできる。
念の為updateはしておいたほうが良い。

if hash jq 2>/dev/null; then
  echo "jq already installed."
else
  echo "jq is not installed. Installing..."
  apt -y update
  apt -y install jq
fi

まとめ

まぁ、可能であればマシンはXCodeにしておくのがベターですかね!

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2