Skip to content

Commit f3dded0

Browse files
committed
Fix new asdf install
1 parent 0a6a945 commit f3dded0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/capistrano/asdf/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module Capistrano
44
module Asdf
5-
VERSION = "1.5.3"
5+
VERSION = "1.5.4"
66
end
77
end

lib/capistrano/tasks/asdf.rake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ namespace :asdf do
3535
end
3636
end
3737
else
38-
execute(:git, "clone", fetch(:asdf_repository), fetch(:asdf_path), "--branch", fetch(:asdf_version))
38+
execute :git, "clone", fetch(:asdf_repository), fetch(:asdf_path)
39+
within(fetch(:asdf_path)) do
40+
execute :git, "checkout", "v#{fetch(:asdf_version)}"
41+
execute :echo, fetch(:asdf_version), ">", "version.txt"
42+
end
3943
info "ASDF #{fetch(:asdf_version)} is installed on #{fetch(:asdf_path)}"
4044
end
4145
end
@@ -121,8 +125,9 @@ namespace :load do
121125
set :asdf_roles, fetch(:asdf_roles, :all)
122126
set :asdf_ruby_use_jemalloc, fetch(:asdf_ruby_use_jemalloc, true)
123127
set :asdf_jemalloc_path, fetch(:asdf_jemalloc_path, "/usr/include/jemalloc")
124-
set :asdf_tools, fetch(:asdf_tools, %w[ruby nodejs])
128+
set :asdf_tools, fetch(:asdf_tools, File.read(".tool-versions").lines.map(&:split).to_h.keys) # Autodetect from .tool-versions
125129
set :asdf_map_ruby_bins, fetch(:asdf_map_ruby_bins, %w[rake gem bundle ruby rails])
126130
set :asdf_map_nodejs_bins, fetch(:asdf_map_nodejs_bins, %w[node npm yarn])
131+
set :asdf_map_python_bins, fetch(:asdf_map_python_bins, %w[python pip])
127132
end
128133
end

0 commit comments

Comments
 (0)