Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asdf 0.16.0 #205761

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 7 additions & 28 deletions Formula/a/asdf.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Asdf < Formula
desc "Extendable version manager with support for Ruby, Node.js, Erlang & more"
homepage "https://asdf-vm.com/"
url "https://github.com/asdf-vm/asdf/archive/refs/tags/v0.15.0.tar.gz"
sha256 "d0cafe61d27b5e3fcb53658821bfbf744fd040a8ea28b0e22277e032b8e8f7fe"
url "https://github.com/asdf-vm/asdf/archive/refs/tags/v0.16.0.tar.gz"
sha256 "e2df22d3943911eec5b2d095d8a89a55cc7da912095d3f806619fd597201b124"
license "MIT"
head "https://github.com/asdf-vm/asdf.git", branch: "master"

Expand All @@ -16,38 +16,17 @@ class Asdf < Formula
sha256 cellar: :any_skip_relocation, all: "a94dd362ce5c3a818f4fa56607eac3c616a3c1191e9f41480093bda2dc308af4"
end

depends_on "autoconf"
depends_on "automake"
depends_on "coreutils"
depends_on "libtool"
depends_on "libyaml"
depends_on "go" => :build

depends_on "openssl@3"
depends_on "readline"
depends_on "unixodbc"

def install
bash_completion.install "completions/asdf.bash" => "asdf"
fish_completion.install "completions/asdf.fish"
zsh_completion.install "completions/_asdf"
libexec.install Dir["*"]

bin.write_exec_script libexec/"bin/asdf"
end

def caveats
<<~EOS
To use asdf, add the following line (or equivalent) to your shell profile
e.g. ~/.profile or ~/.zshrc:
. #{opt_libexec}/asdf.sh
e.g. ~/.config/fish/config.fish
source #{opt_libexec}/asdf.fish
Restart your terminal for the settings to take effect.
EOS
system "go", "build", *std_go_args(ldflags: "-s -w -X main.version=#{version}"), "./cmd/asdf"
generate_completions_from_executable(bin/"asdf", "completion")
end

test do
assert_match version.to_s, shell_output("#{bin}/asdf version")
output = shell_output("#{bin}/asdf plugin-list 2>&1")
SMillerDev marked this conversation as resolved.
Show resolved Hide resolved
assert_match "No plugins installed", output
assert_match "No plugins installed", shell_output("#{bin}/asdf plugin list 2>&1")
end
end
Loading