diff --git a/Formula/twilio.rb b/Formula/twilio.rb index 04675fc..20e0674 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.2.1/twilio-v5.2.1.tar.gz" - version "5.2.1" - sha256 "9cfc9a067adaaebbf6eb3a9beb696771173934499f19b9741181223adfdfb7ce" + url "https://twilio-cli-prod.s3.amazonaws.com/twilio-v5.2.2/twilio-v5.2.2.tar.gz" + version "5.2.2" + sha256 "d8e0953bc174f66989f35979b60d64d2f411317f7dae9db361b406e6a0f7d85d" depends_on "node" def install diff --git a/Formula/twilio@5.2.1.rb b/Formula/twilio@5.2.1.rb new file mode 100644 index 0000000..5a292df --- /dev/null +++ b/Formula/twilio@5.2.1.rb @@ -0,0 +1,21 @@ +require "language/node" + +class TwilioAT521 < 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.2.1/twilio-v5.2.1.tar.gz" + version "5.2.1" + sha256 "9cfc9a067adaaebbf6eb3a9beb696771173934499f19b9741181223adfdfb7ce" + 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