2022-10-24 16:00:17 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-02-13 14:53:01 +02:00
|
|
|
setup_xcode_cloud_environment () {
|
2022-10-24 16:00:17 +03:00
|
|
|
# Return on failures
|
|
|
|
# Fail when expanding unset variables
|
|
|
|
# Trace each command before executing it
|
|
|
|
set -eEu
|
|
|
|
|
|
|
|
# Move to the project root
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Prevent installing dependencies in system directories
|
|
|
|
echo 'export GEM_HOME=$HOME/.gem' >>~/.zshrc
|
|
|
|
echo 'export PATH=$GEM_HOME/bin:$PATH' >>~/.zshrc
|
|
|
|
echo 'export PATH="/usr/local/opt/ruby@2.7/bin:$PATH"' >> ~/.zshrc
|
2022-10-26 18:06:02 +03:00
|
|
|
echo 'export PATH="/Users/local/Library/Python/3.9/bin:$PATH"' >> ~/.zshrc
|
2022-10-24 16:00:17 +03:00
|
|
|
|
|
|
|
export GEM_HOME=$HOME/.gem
|
|
|
|
export PATH=$GEM_HOME/bin:$PATH
|
|
|
|
export PATH="/usr/local/opt/ruby@2.7/bin:$PATH"
|
2022-10-26 18:06:02 +03:00
|
|
|
export PATH="/Users/local/Library/Python/3.9/bin:$PATH"
|
2022-10-24 16:00:17 +03:00
|
|
|
|
|
|
|
# Things don't work well on the default ruby version
|
2023-02-13 14:53:01 +02:00
|
|
|
brew install ruby@2.7
|
2022-10-24 16:00:17 +03:00
|
|
|
|
|
|
|
gem install bundler
|
|
|
|
|
|
|
|
bundle config path vendor/bundle
|
|
|
|
bundle install --jobs 4 --retry 3
|
|
|
|
}
|
|
|
|
|
2023-02-13 14:53:01 +02:00
|
|
|
install_xcode_cloud_brew_dependencies () {
|
2023-03-08 19:01:54 +00:00
|
|
|
brew update && brew install xcodegen imagemagick
|
2022-10-24 16:00:17 +03:00
|
|
|
}
|
|
|
|
|
2023-02-13 14:53:01 +02:00
|
|
|
install_xcode_cloud_python_dependencies () {
|
|
|
|
pip3 install towncrier # Install towncrier for generating changelogs
|
|
|
|
}
|
|
|
|
|
|
|
|
setup_github_actions_environment() {
|
2023-07-20 17:15:33 +01:00
|
|
|
unset HOMEBREW_NO_INSTALL_FROM_API
|
|
|
|
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|
|
|
|
2023-05-26 13:38:36 +03:00
|
|
|
brew update && brew install xcodegen swiftformat git-lfs imagemagick
|
2023-02-13 14:53:01 +02:00
|
|
|
|
|
|
|
# brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters
|
|
|
|
|
|
|
|
bundle config path vendor/bundle
|
|
|
|
bundle install --jobs 4 --retry 3
|
2023-12-19 19:50:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
setup_github_actions_translations_environment() {
|
|
|
|
unset HOMEBREW_NO_INSTALL_FROM_API
|
|
|
|
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|
|
|
|
|
|
|
brew update && brew install swiftgen mint localazy/tools/localazy
|
|
|
|
|
|
|
|
mint install Asana/locheck
|
2022-10-24 16:00:17 +03:00
|
|
|
}
|