diff --git a/Formula/twilio.rb b/Formula/twilio.rb index cb2b8ba..d617eea 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.16.1/twilio-v5.16.1.tar.gz" - version "5.16.1" - sha256 "e4d9ad98adc572197f397862710f8adbbb593decbe250ba044af61dc659ad2cc" + url "https://twilio-cli-prod.s3.amazonaws.com/twilio-v5.16.2/twilio-v5.16.2.tar.gz" + version "5.16.2" + sha256 "f6c36e3d444804aaabbc78dbbd098351cdb0c70d029c9a93ef1e5dd2baaa1c61" depends_on "node" def install diff --git a/Formula/twilio@5.16.1.rb b/Formula/twilio@5.16.1.rb new file mode 100644 index 0000000..1c1c34a --- /dev/null +++ b/Formula/twilio@5.16.1.rb @@ -0,0 +1,21 @@ +require "language/node" + +class TwilioAT5161 < 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.16.1/twilio-v5.16.1.tar.gz" + version "5.16.1" + sha256 "e4d9ad98adc572197f397862710f8adbbb593decbe250ba044af61dc659ad2cc" + 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