Skip to content

Instantly share code, notes, and snippets.

@blendthink
Last active December 28, 2022 09:12
Show Gist options
  • Save blendthink/9a06723446ff2d6f9a44fe8285610377 to your computer and use it in GitHub Desktop.
Save blendthink/9a06723446ff2d6f9a44fe8285610377 to your computer and use it in GitHub Desktop.
Add stoplight-studio
#!/usr/bin/env zsh
# 使い方
# Mac のターミナルを開いて、下記のコマンドを実行する。ただし、Apple ID でログインを済ませておく。
#
# Xcode のインストールも済ませておく
# xcode-select --install
#
# sh -c "$(curl -fsSL https://gist.github.com/blendthink/9a06723446ff2d6f9a44fe8285610377/raw)"
# Appleのログインを済ませておく
# アプリのインストール時にパスワードを求められることがあるのでちょくちょく確認する(後々、自動化する)
function existsCommand {
which $1 > /dev/null;
}
#
# Install homebrew.
#
if ! existsCommand brew ; then
echo " --------- Homebrew ----------"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
source ~/.zprofile
brew upgrade
brew -v
echo " ------------ END ------------"
fi
# JetBrainsのIDEAでPlantURLを描画するために必要
brew install graphviz
# tree
brew install tree
# Zoom
brew install zoom
#
# Install web apps.
#
# brew search {$app}
#
echo " ----- Install web apps ------"
brew install --cask google-chrome
# brew install --cask discord
# brew install --cask mysqlworkbench
# brew install --cask cyberduck
brew install --cask bitwarden
brew install --cask skitch
brew install --cask figma
brew install --cask notion
brew install --cask fork
brew install --cask docker
brew install --cask jetbrains-toolbox
brew install --cask xcodes
brew install --cask stoplight-studio
# 実行後にAndroidStudioにJDKの設定をする
# brew tap AdoptOpenJDK/openjdk
# brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
# AndroidStudioはJetBrainsToolboxから入手している
# brew install --cask android-studio
# Bitwarden を利用してるため不要
# brew install --cask 1password
# brew install --cask safeincloud-password-manager
echo " ------------ END ------------"
brew install mas
#
# Install App Store apps
#
# 一度、どれか1つを Apple Store でダウンロードする必要がある
# mas search {$app}
#
echo " --- Install AppStore apps ---"
mas install 497799835 # Xcode
mas install 803453959 # Slack
mas install 1482454543 # Twitter
mas install 540348655 # Monosnap
echo " ------------ END ------------"
sudo xcodebuild -license
#
# Install flutter.
#
echo " ------ Install flutter ------"
brew tap leoafarias/fvm
brew install fvm
fvm global 2.10.4
touch ~/.zprofile
echo 'export PATH=$PATH:~/fvm/default/bin' >> ~/.zprofile
source ~/.zprofile
# M1 Mac で Rosetta2 をインストールする必要がある
# https://github.com/flutter/flutter/issues/74511
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
echo " ------------ END ------------"
# AndroidStudio Plugin
# .ignore
# CamelCase
# Flutter
# Dart
# PlantUML integration
#
# Git
#
echo " ------- Setting Git --------"
# デフォルトブランチを main に設定
git config --global init.defaultBranch main
git config --global user.name blendthink
git config --global user.email [email protected]
# 署名設定
brew install gpg
git config --global commit.gpgsign true
git config --global gpg.program $(which gpg)
#git config --global user.signingkey ***
# global ignore の設定
mkdir -p $HOME/.config/git
cat <<EOF > $HOME/.config/git/ignore
.DS_Store
EOF
echo " ------------ END ------------"
#
# GitHub Actions
#
echo " -- Setting GitHub Actions ---"
brew install gnupg
echo " ------------ END ------------"
# AndroidStudio Configure → SDK Manager → SDK Tools → uncheck "Hide Obsolete Packages" → check "Android SDK Tools (Obsolete)"
#
# flutter doctor --android-licenses
# flutter doctor
#
# Install Golang.
#
# echo " ------ Golang ------"
# brew install go
# mkdir -p $Home/go
# echo 'export GOPATH=$(go env GOPATH)' >> ~/.zprofile
# echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zprofile
# echo " ------------ END ------------"
# VPN の設定忘れない
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment