diff --git a/Formula/twilio.rb b/Formula/twilio.rb index 8a2b110..3879873 100644 --- a/Formula/twilio.rb +++ b/Formula/twilio.rb @@ -3,9 +3,9 @@ class Twilio < Formula desc "unleash the power of Twilio from your command prompt" homepage "https://github.com/twilio/twilio-cli" - url "https://twilio-cli-prod.s3.amazonaws.com/twilio-v5.20.1/twilio-v5.20.1.tar.gz" - version "5.20.1" - sha256 "797cca2fbc0d7429e0eae5d9de94e4f83023d5a506aa2a7f8398dfeea78d5c76" + url "https://twilio-cli-prod.s3.amazonaws.com/twilio-v5.21.0/twilio-v5.21.0.tar.gz" + version "5.21.0" + sha256 "506d5143125a4175150ab03259b60f44947770c5dd189c99284a4fd6b0c2f8e1" depends_on "node" def install diff --git a/Formula/twilio@5.20.1.rb b/Formula/twilio@5.20.1.rb new file mode 100644 index 0000000..68c724f --- /dev/null +++ b/Formula/twilio@5.20.1.rb @@ -0,0 +1,21 @@ +require "language/node" + +class TwilioAT5201 < Formula + desc "unleash the power of Twilio from your command prompt" + homepage "https://github.com/twilio/twilio-cli" + url "https://twilio-cli-prod.s3.amazonaws.com/twilio-v5.20.1/twilio-v5.20.1.tar.gz" + version "5.20.1" + sha256 "797cca2fbc0d7429e0eae5d9de94e4f83023d5a506aa2a7f8398dfeea78d5c76" + depends_on "node" + + def install + inreplace "bin/twilio", /^CLIENT_HOME=/, "export TWILIO_OCLIF_CLIENT_HOME=#{lib/"client"}\nCLIENT_HOME=" + libexec.install Dir["*"] + bin.install_symlink libexec/"bin/twilio" + end + + def post_install + pid = spawn("node #{libexec}/welcome.js") + Process.wait pid + end +end