Skip to content

Commit

Permalink
Remove postgresql from list that Homebrew installs
Browse files Browse the repository at this point in the history
1. This causes problems on Mojave
   (see petere/homebrew-postgresql#41)
2. Those who develop in Docker don't need it
  • Loading branch information
Scott Cranfill committed Sep 11, 2019
1 parent a04a885 commit 7af2c8b
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions provision_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Installing in home directory against the standard advice,
# because we don't have access to their preferred location (/usr/local).
echo 'CFPB Mac Setup !¡!¡! INSTALLING HOMEBREW ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING HOMEBREW ¡!¡!¡'
mkdir $HOME/homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C ~/homebrew

## Update path for this script to be able to access the brew command.
Expand All @@ -15,15 +15,15 @@ export PATH="${HOME}/homebrew/bin:${PATH}"

# Install standard Brew formulae that most devs will need or want.
# Git, in particular, give us a more modern version than what ships with macOS.
echo 'CFPB Mac Setup !¡!¡! INSTALLING STANDARD BREW FORMULAE ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING STANDARD BREW FORMULAE ¡!¡!¡'
echo '(This will take a while. Stretch your legs.)'
brew install git git-secrets postgresql pyenv pyenv-virtualenvwrapper
brew install git git-secrets pyenv pyenv-virtualenvwrapper


# Set up Python stuff.
# Following the instructions at:
# https://github.com/cfpb/development/blob/master/guides/installing-python.md
echo 'CFPB Mac Setup !¡!¡! INITIALIZING PYENV ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INITIALIZING PYENV ¡!¡!¡'

## Export necessary environment variables for use in this script.
export PYENV_ROOT="${HOME}/.pyenv"
Expand All @@ -35,11 +35,12 @@ if command -v pyenv 1>/dev/null 2>&1; then
fi

## Install the versions of Python that we use.
echo 'CFPB Mac Setup !¡!¡! INSTALLING PYTHON 3.6.8 & 2.7.15 ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING PYTHON 3.6.9 AND 2.7.16 ¡!¡!¡'
pyenv install 3.6.9
pyenv install 2.7.16

## Set the global Python versions.
echo '!¡!¡! CFPB Mac Setup !¡!¡! SETTING GLOBAL PYTHON VERSIONS ¡!¡!¡'
echo '(This will make `python` version 3.6.9, and `python2` will be 2.7.16.)'
pyenv global 3.6.9 2.7.16

Expand All @@ -49,7 +50,7 @@ pyenv virtualenvwrapper_lazy

# Install NVM (Node Version Manager).
# https://github.com/nvm-sh/nvm
echo 'CFPB Mac Setup !¡!¡! INSTALLING NVM ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING NVM ¡!¡!¡'
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

## Export necessary environment variable for use in this script.
Expand All @@ -61,35 +62,39 @@ if [ -s "$NVM_DIR/nvm.sh" ]; then
fi

# Install the latest LTS (long-term support) release of Node and activate it.
echo 'CFPB Mac Setup !¡!¡! INSTALLING NODE ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING NODE ¡!¡!¡'
nvm install lts/*


# Install the Yarn package manager.
# https://yarnpkg.com/
#
# This will automatically add it to the PATH by appending .bashrc.
echo 'CFPB Mac Setup !¡!¡! INSTALLING YARN ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING YARN ¡!¡!¡'
curl -o- -L https://yarnpkg.com/install.sh | bash

# Install global Node packages.
echo 'CFPB Mac Setup !¡!¡! INSTALLING GLOBAL NODE PACKAGES ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING GLOBAL NODE PACKAGES ¡!¡!¡'
yarn global add yo generator-cf generator-node snyk


# Apply standard dotfiles, backing up existing files if present.
echo 'CFPB Mac Setup !¡!¡! CREATING STANDARD DOTFILES ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! CREATING STANDARD DOTFILES ¡!¡!¡'
echo 'Note: Existing files will be backed up in the same location with a suffix of the date.'
rsync -abq --suffix=_`date +"%Y%m%d_%H%M"` ./dotfiles/ $HOME/


# Install git-secrets hooks.
# https://github.com/awslabs/git-secrets
echo 'CFPB Mac Setup !¡!¡! INSTALLING GIT-SECRETS ¡!¡!¡'
echo '!¡!¡! CFPB Mac Setup !¡!¡! INSTALLING GIT-SECRETS ¡!¡!¡'
git secrets --install $HOME/.git-templates/git-secrets
git config --global init.templateDir $HOME/.git-templates/git-secrets
git secrets --add-provider -- egrep -v '^$|^#' $HOME/.secret_patterns


# Add global Git config for .gitmessage.
git config --global commit.template $HOME/.gitmessage


echo '!¡!¡! CFPB Mac Setup !¡!¡! SETUP COMPLETE! ¡!¡!¡'
echo 'Be sure to `source ~./bashrc` or open a new terminal window.'

0 comments on commit 7af2c8b

Please sign in to comment.