Skip to content
This repository has been archived by the owner on May 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #10 from joshukraine/dev
Browse files Browse the repository at this point in the history
macOS 10.14 Mojave
  • Loading branch information
joshukraine authored Oct 22, 2018
2 parents 6796311 + 305886b commit bf02817
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 145 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Joshua Steele
Copyright (c) 2018 Joshua Steele

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,33 @@

The purpose of this script is to provision a new machine running a fresh install of macOS. It installs and configures the software, dotfiles, and general preferences I use for web development — primarily [Ruby][ruby]/[Rails][rails] and [Node.js][nodejs]. The command line environment is based on Zsh (via [Oh-My-Zsh][omz]), [Vim][vim]/[Neovim][neovim] and [Tmux][tmux] running in [iTerm2][iterm2] or [Terminal.app][terminal].

The [`bootstrap`][bootstrap] script is very specific to the Mac platform. Version 3.x has been successfully tested on the following versions of macOS:
The [`bootstrap`][bootstrap] script is very specific to the Mac platform. Version 4.x has been successfully tested on the following versions of macOS:

* High Sierra (10.13)
* Mojave (10.14)

Previous versions of Mac Bootstrap have been successfully tested on the following versions of macOS:

* High Sierra (10.13)
* Sierra (10.12)
* El Capitan (10.11)

▹ **Looking for dotfiles only? Check out [My Dotfiles for macOS](http://jsua.co/dotfiles)**

## Prerequisites

Make sure your software is up to date:
1. Make sure your software is up to date:

sudo softwareupdate -i -a --restart

sudo softwareupdate -i -a --restart
1. Install Apple's command line tools:

Install Apple's command line tools:
xcode-select --install

xcode-select --install
1. Reboot, check for additional updates, then reinstall and reboot as needed.

Reboot, check for additional updates, then reinstall, reboot if needed.
1. Install preliminary Mac apps. These would be any MAS or other apps referenced by the macos-dock script and not handled by `brew cask`. (See `install/macos-dock`)

Sign in to the Mac App Store. If you don't do this before running the `bootstrap` script, [`mas-cli`][mas-cli] may have trouble installing apps.
**NOTE: MAS app installation was previously handled by the [`mas-cli`][mas-cli] utility. However, as of macOS Mojave, the signin functionality for `mas-cli` is broken. [View details here.](https://github.com/mas-cli/mas#-sign-in)**

## Installation

Expand All @@ -50,7 +53,7 @@ WARNING: This script will ask for your admin password multiple times. You'll nee

When you invoke `bootstrap`, here's what it does:

* Step 1: Run my adaptation of thoughtbot's [Laptop script][laptop]. This is a provisioning script which installs lots of goodies like Homebrew, asdf, postgres, etc. My version is now stored locally in this repo under [`install/laptop`][my-laptop]. Step 1 also installs a variety of packages via [Homebrew Bundle][brew-bundle], including several apps from the Mac App Store via [mas-cli][mas-cli].
* Step 1: Run my adaptation of thoughtbot's [Laptop script][laptop]. This is a provisioning script which installs lots of goodies like Homebrew, asdf, postgres, etc. My version is now stored locally in this repo under [`install/laptop`][my-laptop]. Step 1 also installs a variety of packages via [Homebrew Bundle][brew-bundle].
* Step 2: Install [Oh-My-Zsh][omz].
* Step 3: Clone [My Dotfiles for macOS][dotfiles] and symlink them to `$HOME`.
* Step 4: Install various [executable scripts][exe-scripts] (mostly for Tmux and Git) to `$HOME/bin`.
Expand All @@ -66,7 +69,7 @@ NOTE: Previously, I used the `bootstrap` script to set up many of the standard d
After running `bootstrap` there are still a few things that need to be done.

* Restart your machine in order for some changes to take effect.
* Install remaining software from Mac App Store.
* Install remaining software from Mac App Store or other sources.
* Install remaining Homebrew packages via [Brew Bundle][brew-bundle] with `brew bundle install`.
* Set up iTerm2 and/or Terminal.app profile (see details below).
* Launch Neovim and `:checkhealth`.
Expand Down Expand Up @@ -103,7 +106,6 @@ These are my (current) primary macOS keyboard shortcuts:
* Spotlight search: ⌘⇧Space
* Switch input source: ⌃⇧Space
* Fantastical: ⌥⌘Space
* Things: ⌃Space
* iTerm2 hotkey window: ⌥Space
* Remap Caps Lock to CTRL (anyone know a way to automate this?)

Expand All @@ -117,7 +119,7 @@ No one else's development setup will ever be a perfect match for you. That said,

3) Review the 8 steps in [`bootstrap`][bootstrap] and make your own customizations. Here's an overview of what's going on:

* Step 1 (required): Take a look at [Laptop][laptop] and see what you might want to tweak. One of the biggest things to review is the `brew bundle` list of packages, casks, and MAS apps that will be installed. Customize as needed. Laptop also sets up some basics that are required by the bootstrap script later on.
* Step 1 (required): Take a look at [Laptop][laptop] and see what you might want to tweak. One of the biggest things to review is the `brew bundle` list of packages and casks that will be installed. Customize as needed. Laptop also sets up some basics that are required by the bootstrap script later on.
* Step 2 (recommended): Use `oh-my-zsh`?
* Step 3 (required): The dotfiles. Update the `$DOTFILES_*` variables (see [`bootstrap`][bootstrap] under "VARIABLE DECLARATIONS") to reference your dotfiles. As a starting point, you can [fork mine][dotfiles] and then point to your fork.
* Step 4 (recommended): Install scripts to `~/bin`?
Expand Down Expand Up @@ -187,7 +189,7 @@ Copyright © 2018 Joshua Steele. [MIT License](https://github.com/joshukrain
[omz]: http://ohmyz.sh/
[rails]: https://rubyonrails.org/
[ruby]: https://www.ruby-lang.org/en
[screenshot]: https://s3.amazonaws.com/images.jsua.co/mac-bootstrap-welcome-05-26-2018.png
[screenshot]: https://s3.amazonaws.com/images.jsua.co/mac-bootstrap-welcome-10-21-2018.png
[stratus3d]: http://stratus3d.com/blog/2015/02/28/sync-iterm2-profile-with-dotfiles-repository/
[terminal]: https://en.wikipedia.org/wiki/Terminal_(macOS)
[tmux]: https://github.com/tmux/tmux/wiki
Expand Down
4 changes: 2 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ DEFAULT_DOTFILES_BRANCH="master"
DEFAULT_COMPUTER_NAME="Joshua's Mac"
DEFAULT_HOST_NAME="joshuas-mac"
DEFAULT_TIME_ZONE="Europe/Kiev"
DEFAULT_NODEJS_VERSION="10.2.1"
DEFAULT_RUBY_VERSION="2.5.1"
DEFAULT_NODEJS_VERSION="8.12.0"
DEFAULT_RUBY_VERSION="2.5.3"


################################################################################
Expand Down
39 changes: 10 additions & 29 deletions install/laptop
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,15 @@ brew "git-quick-stats"
brew "gmp" # Vim dependency
brew "gpg" # asdf-nodejs dependency
brew "htop"
brew "hub"
brew "imagemagick"
brew "libtool" # asdf dependency
brew "libxslt" # asdf dependency
brew "libyaml" # asdf dependency
brew "mas"
brew "neovim", args: ["HEAD"]
brew "neovim"
brew "overmind"
brew "pandoc"
brew "perl"
brew "pgcli"
brew "phantomjs"
brew "postgresql", restart_service: true
brew "python"
brew "python3"
Expand All @@ -171,29 +168,15 @@ brew "zsh"
# homebrew-cask
# https://github.com/caskroom/homebrew-cask
cask_args appdir: "/Applications"
cask "1password"
cask "dash"
cask "dropbox"
cask "fantastical"
cask "firefox"
cask "google-chrome"
cask "iterm2"
cask "postico"
cask "skype"
# mas-cli
# https://github.com/mas-cli/mas
mas "Evernote", id: 406056744
mas "Slack", id: 803453959
mas "Spark", id: 1176895641
mas "Things3", id: 904280696
mas "Tweetbot", id: 557168941
EOF

laptop_echo "Configuring asdf version manager..."
if [ ! -d "$HOME/.asdf" ]; then
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.3
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.6.0
append_to_zshrc "source $HOME/.asdf/asdf.sh" 1
fi

Expand Down Expand Up @@ -238,23 +221,21 @@ number_of_cores=$(sysctl -n hw.ncpu)
bundle config --global jobs $((number_of_cores - 1))

laptop_echo "Installing latest Node..."
PATH="$PATH:$ASDF_DIR/installs/nodejs/$ASDF_NODEJS_VERSION/bin"
cat << EOF > "$HOME"/.default-npm-packages
gulp-cli
neovim
pug
standard
stylelint
svgo
vue-cli
EOF
bash "$HOME/.asdf/plugins/nodejs/bin/import-release-team-keyring"
install_asdf_language "nodejs" "$ASDF_NODEJS_VERSION"
echo "Node --> $(which node)"
node -v
echo "NPM --> $(which npm)"
npm -v

npm install -g gulp-cli
npm install -g neovim
npm install -g pug
npm install -g standard
npm install -g stylelint
npm install -g svgo
npm install -g vue-cli

laptop_echo "Installing Python support for Neovim..."
echo "Python 2 --> $(which python)"
python --version
Expand Down
Loading

0 comments on commit bf02817

Please sign in to comment.