diff --git a/Formula/twilio.rb b/Formula/twilio.rb index af6947f..1da8157 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.11.0/twilio-v5.11.0.tar.gz" - version "5.11.0" - sha256 "409864f5e5bc65cc32d180f133e27c27f92ad8a3d90a41484dab1d2cf539806e" + url "https://twilio-cli-prod.s3.amazonaws.com/twilio-v5.12.0/twilio-v5.12.0.tar.gz" + version "5.12.0" + sha256 "8aa358d1e9835fc5a5ca2ef88e791d71dc25086e06ee8b179ed57d1543a6a291" depends_on "node" def install diff --git a/Formula/twilio@5.11.0.rb b/Formula/twilio@5.11.0.rb new file mode 100644 index 0000000..5ee7007 --- /dev/null +++ b/Formula/twilio@5.11.0.rb @@ -0,0 +1,21 @@ +require "language/node" + +class TwilioAT5110 < 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.11.0/twilio-v5.11.0.tar.gz" + version "5.11.0" + sha256 "409864f5e5bc65cc32d180f133e27c27f92ad8a3d90a41484dab1d2cf539806e" + 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