From dc64e99a3218bfb144df299ddc5e0192b7f2e753 Mon Sep 17 00:00:00 2001 From: Ben Di Maggio Date: Thu, 11 Aug 2022 11:39:25 -0400 Subject: [PATCH 1/3] Trying a new approach to a minimal TS env for contractors. --- Brewfile-dev-minimal | 34 ++++++++++++++++++++++++++++++++++ Brewfile-minimal | 5 +++++ README.md | 4 +++- environment_setup.sh | 34 +++++++++++++++++----------------- 4 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 Brewfile-dev-minimal create mode 100644 Brewfile-minimal diff --git a/Brewfile-dev-minimal b/Brewfile-dev-minimal new file mode 100644 index 0000000..a737db1 --- /dev/null +++ b/Brewfile-dev-minimal @@ -0,0 +1,34 @@ +cask_args appdir: '/Applications' + +tap 'homebrew/cask-versions' +tap 'homebrew/services' + +brew 'colordiff' +brew 'coreutils' +brew 'dnsmasq' +brew 'hub' +brew 'docker' +brew 'jq' +brew 'mariadb', restart_service: true +brew 'nginx' +brew 'composer' +brew 'php' +brew 'php@7.3' +brew 'php@7.4' +brew 'php@8.0' +brew 'rbenv' +brew 'redis' +brew 'ruby-build' +brew 'tree' +brew 'npm' +brew 'yarn' +brew 'openssl' +brew 'pv' +brew 'terminal-notifier' +brew 'trash' +brew 'rar' +brew 'wget' +brew 'xz' + +cask 'ngrok' +cask 'postman' diff --git a/Brewfile-minimal b/Brewfile-minimal new file mode 100644 index 0000000..bcccf70 --- /dev/null +++ b/Brewfile-minimal @@ -0,0 +1,5 @@ +cask_args appdir: '/Applications' + +brew 'curl' +brew 'git' +brew 'mas' diff --git a/README.md b/README.md index 30ea9a5..90c9ada 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,13 @@ TS Environment Sets you up with a server environment on a Mac for Drupal development. If you need examples of how to install common packages with Homebrew, checkout environment_setup.sh +NOTE: this branch is a minimally-intrusive version of our standard environment, intended for use by contractors who'll likely have their own setups, which we don't want to mess up. + ### Getting Started: ``` cd ~ xcode-select --install -git clone git@github.com:thinkshout/ts_environment.git +git clone -b contractors git@github.com:thinkshout/ts_environment.git cd ts_environment ./environment_setup.sh ``` diff --git a/environment_setup.sh b/environment_setup.sh index 9ced2c2..27a0fbf 100755 --- a/environment_setup.sh +++ b/environment_setup.sh @@ -53,33 +53,33 @@ else exit fi -# Install everything in the Brewfile -brew bundle --file=Brewfile +# Install everything in the *minimal* Brewfile +brew bundle --file=Brewfile-minimal -if confirmupdate "Would you like to install local development programs like PHPStorm, Sequel Ace, PHP, MariaDB, etc?"; then +if confirmupdate "Would you like to install the minimal local development--nginx, MariaDB, dnsmasq, etc?"; then echo $'\n' echo 'Installing local development environment...' - brew bundle --file=Brewfile-dev + brew bundle --file=Brewfile-dev-minimal # Set some standard git configuration git config --global pull.rebase true export PATH=./vendor/bin:~/.composer/vendor/bin:/usr/local/bin:/usr/local/sbin:$PATH - installed=`ls ~/.oh-my-zsh | grep -i 'oh-my-zsh'` - if [ "$installed" == "" ] ; then - echo $'\n' - echo ' Installing Oh My ZSH' - echo $'\n' - - curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh - - echo "export PATH=./vendor/bin:~/.composer/vendor/bin:/usr/local/bin:/usr/local/sbin:$PATH" >> ~/.zshrc - - mkdir -pv ~/.oh-my-zsh/custom - cp config/ts.zsh ~/.oh-my-zsh/custom/ts.zsh - fi +# installed=`ls ~/.oh-my-zsh | grep -i 'oh-my-zsh'` +# if [ "$installed" == "" ] ; then +# echo $'\n' +# echo ' Installing Oh My ZSH' +# echo $'\n' +# +# curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh +# +# echo "export PATH=./vendor/bin:~/.composer/vendor/bin:/usr/local/bin:/usr/local/sbin:$PATH" >> ~/.zshrc +# +# mkdir -pv ~/.oh-my-zsh/custom +# cp config/ts.zsh ~/.oh-my-zsh/custom/ts.zsh +# fi # Configure MariaDB by copying remote config file to local system. cp config/ts.cnf $(brew --prefix)/etc/my.cnf.d/ts.cnf From 48f501fbda277248a9c40b1f56ba15b6f33e19a6 Mon Sep 17 00:00:00 2001 From: Ben Di Maggio Date: Thu, 11 Aug 2022 11:46:11 -0400 Subject: [PATCH 2/3] Fixing the internal reference to the GH repo so that it references the right branch (i.e. contractors). --- environment_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_setup.sh b/environment_setup.sh index 27a0fbf..67fbbd9 100755 --- a/environment_setup.sh +++ b/environment_setup.sh @@ -42,7 +42,7 @@ fi echo "Downloading Homebrew standard bundle." if [ ! -d ~/ts_environment ] ; then - git clone https://github.com/thinkshout/ts_environment.git ~/ts_environment + git clone -b contractors https://github.com/thinkshout/ts_environment.git ~/ts_environment fi cd ~/ts_environment; git checkout master && git pull From 2f99360335b19c1537ad80c612e6eadcf4ae260d Mon Sep 17 00:00:00 2001 From: Ben Di Maggio Date: Thu, 11 Aug 2022 11:47:59 -0400 Subject: [PATCH 3/3] Almost missed this reference to master --- environment_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_setup.sh b/environment_setup.sh index 67fbbd9..898334d 100755 --- a/environment_setup.sh +++ b/environment_setup.sh @@ -45,7 +45,7 @@ if [ ! -d ~/ts_environment ] ; then git clone -b contractors https://github.com/thinkshout/ts_environment.git ~/ts_environment fi -cd ~/ts_environment; git checkout master && git pull +cd ~/ts_environment; git checkout contractors && git pull if confirmupdate "Would you like to proceed?"; then echo "Starting setup..."