Skip to content

Instantly share code, notes, and snippets.

@PatelUtkarsh
Last active November 23, 2018 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatelUtkarsh/035fe5f6257398f114a8f524f6f3f03a to your computer and use it in GitHub Desktop.
Save PatelUtkarsh/035fe5f6257398f114a8f524f6f3f03a to your computer and use it in GitHub Desktop.
Easyengine Brew core and cask formula
cask 'easyengine' do
version '4.0.0'
homepage 'https://easyengine.io/'
url 'https://github.com/EasyEngine/easyengine/releases/download/v4.0.0/easyengine.phar'
sha256 '5d7f7ec95911883240717458024f0e7c69309f7bd3646353a0594e1b0900eaa6'
name 'Easyengine'
depends_on formula: 'php'
depends_on cask: 'docker'
container type: :naked
binary 'easyengine.phar', target: 'ee'
zap trash: '~/easyengine'
end
class Easyengine < Formula
desc "Command-line control panel to manage WordPress sites"
homepage "https://easyengine.io/"
url "https://raw.githubusercontent.com/EasyEngine/easyengine-builds/master/phar/easyengine-nightly.phar"
sha256 "c46cd7dbec9f9e58415491ec8d03fcbe2429feb858579108ad1fa81353db4875"
bottle :unneeded
depends_on "php"
def install
# resolve cask docker depedency.
# system "/usr/local/bin/brew", "cask", "install", "docker"
bin.install "easyengine-nightly.phar" => "ee"
end
def caveats; <<~EOS
EasyEngine works with Docker.
You can download Docker using:
brew cask install docker
EOS
end
test do
system bin/"ee cli version"
end
end
@PatelUtkarsh
Copy link
Author

PatelUtkarsh commented Nov 21, 2018

Make sure you don't have /usr/local/bin/ee binary install if then remove it.

To test this formula:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
wget https://gist.githubusercontent.com/PatelUtkarsh/035fe5f6257398f114a8f524f6f3f03a/raw/3711578f355c4280de0ad650ffd33083d51aee4c/easyengine.rb

and then run brew install easyengine to install it.

@PatelUtkarsh
Copy link
Author

PatelUtkarsh commented Nov 23, 2018

rm /usr/local/bin/ee
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks
wget https://gist.githubusercontent.com/PatelUtkarsh/035fe5f6257398f114a8f524f6f3f03a/raw/2c0d8d4c5bd1ef29e7be2c8729f3a11d05c2b5a3/easyengine-cask.rb -O easyengine.rb
brew cask install easyengine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment