Skip to content

Commit

Permalink
use tag for oapi-cli version, and add master version
Browse files Browse the repository at this point in the history
Signed-off-by: matthias.gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Jun 17, 2024
1 parent 8761009 commit 8872a5c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions Formula/oapi-cli-git.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
class OapiCliGit < Formula
desc "Official Outscale CLI providing connectors to Outscale API, nightly version"
homepage "https://github.com/outscale/oapi-cli"
url "https://github.com/outscale/oapi-cli.git"
head "https://github.com/outscale/oapi-cli", branch: "master"
sha256 ""
license "BSD-3-Clause"
version "git"

conflicts_with "oapi-cli"
depends_on "curl"
depends_on "json-c"
depends_on "cmake" => :build


def install
system "git", "submodule", "update", "--init"
system "make"
system "mkdir -p #{prefix}/bin"
system "cp ./oapi-cli #{prefix}/bin/"
system "mkdir -p #{prefix}/contrib/completions/bash/"
system "mkdir -p #{prefix}/contrib/completions/zsh/"
system "cp ./oapi-cli-completion.bash #{prefix}/contrib/completions/bash/"
system "echo autoload bashcompinit > #{prefix}/contrib/completions/zsh/oapi-cli-completion.zsh"
system "echo bashcompinit >> #{prefix}/contrib/completions/zsh/oapi-cli-completion.zsh"
system "echo source #{prefix}/contrib/completions/bash/oapi-cli-completion.bash >> #{prefix}/contrib/completions/zsh/oapi-cli-completion.zsh"
end

test do
str = shell_output("#{bin}/oapi-cli --help")
assert_match "Usage: oapi-cli [--help] CallName [options] [--Params ParamArgument]", str
end
end
2 changes: 1 addition & 1 deletion Formula/oapi-cli.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class OapiCli < Formula
desc "Official Outscale CLI providing connectors to Outscale API"
homepage "https://github.com/outscale/oapi-cli"
url "https://github.com/outscale/oapi-cli.git"
url "https://github.com/outscale/oapi-cli.git", tag: "v0.4.0"
head "https://github.com/outscale/oapi-cli", branch: "v0.4.0"
sha256 ""
license "BSD-3-Clause"
Expand Down

0 comments on commit 8872a5c

Please sign in to comment.