-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use tag for oapi-cli version, and add master version
Signed-off-by: matthias.gatto <[email protected]>
- Loading branch information
1 parent
8761009
commit 8872a5c
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters