Beam/ci_scripts/ci_common.sh
Stefan Ceriu 8de0c008db
Fixed XcodeCloud release workflows (#268)
* Export python 3.9 path and fix towncrier
* Fix Xcode Cloud git setup
2022-10-26 18:06:02 +03:00

39 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
setup_environment () {
# 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
echo 'export PATH="/Users/local/Library/Python/3.9/bin:$PATH"' >> ~/.zshrc
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH
export PATH="/usr/local/opt/ruby@2.7/bin:$PATH"
export PATH="/Users/local/Library/Python/3.9/bin:$PATH"
# Things don't work well on the default ruby version
brew install "ruby@2.7"
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
}
install_brew_dependencies () {
brew install "xcodegen"
brew install "imagemagick"
}
install_python_dependencies () {
pip3 install -r requirements.txt # Install towncrier for generating changelogs
}