diff --git a/Formula/osc-cost.rb b/Formula/osc-cost.rb index ed01559..b377196 100644 --- a/Formula/osc-cost.rb +++ b/Formula/osc-cost.rb @@ -1,31 +1,16 @@ class OscCost < Formula - desc "osc-cost allows Outscale users to estimate their cloud costs." - homepage "https://github.com/outscale/osc-cost" - url "https://github.com/outscale/osc-cost/releases/download/v0.3.2/osc-cost-v0.3.2-x86_64-unknown-linux-musl" - sha256 "19251816d6f49ada7e6d371cc38232e29cd6300041df5d01216090b27ee8a0c9" - - license "BSD-3-Clause" - version "0.1.3" - - def install - bin.install "osc-cost" - chmod 0777, "osc-cost" - completions = prefix/"contrib/completions" - bash_completion_file = "contrib/completions/bash/osc-cost-completion.bash" - zsh_completion_file = "#{completions}/zsh/osc-cost-completion.zsh" - system "mkdir -p #{completions}/bash/" - system "mkdir -p #{completions}/zsh/" - system "cp", bash_completion_file, "#{completions}/bash/" if File.exist?(bash_completion_file) - system "sh", "-c", <<~EOS - echo 'autoload bashcompinit' > #{zsh_completion_file} - echo 'bashcompinit' >> #{zsh_completion_file} - echo 'source #{completions}/bash/osc-cost-completion.bash' >> #{zsh_completion_file} - EOS - end - - test do - assert_match "osc-cost", shell_output("#{bin}/osc-cost") - end + desc "osc-cost allows Outscale users to estimate their cloud costs." + homepage "https://github.com/outscale/osc-cost" + url "https://github.com/outscale/osc-cost/releases/download/v0.3.3/osc-cost-v0.3.3-x86_64-apple-darwin" + sha256 "dfec6444cdc4eecead4ab67d35a3d841a4fd72c2a12614f69d73ce807e47fcb9" + license "BSD-3-Clause" + + def install + bin.install "osc-cost-v0.3.3-x86_64-apple-darwin" => "osc-cost" end - - \ No newline at end of file + + test do + str = shell_output("#{bin}/osc-cost --help") + assert_match "osc-cost", str + end +end