30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/homesteading/commands/update.rb', line 30
def client
puts
options = parse_options
if options[:beta]
puts "* Cloning Homesteading from GitHub into /tmp"
FileUtils.cd "/tmp" do
system "git clone [email protected]:homesteading/homesteading.git"
end
puts "* Building homesteading gem from .gemspec"
FileUtils.cd "/tmp/homesteading" do
system "gem build homesteading.gemspec"
end
dot_gem = Dir.glob("/tmp/homesteading/*.gem").last
version = dot_gem.split("/").last.sub("homesteading-", "").sub(".gem", "")
puts "* Installing homesteading version #{version}"
system "gem install #{dot_gem}"
puts "* Cleaning up"
FileUtils.rm_rf "/tmp/homesteading"
puts "* Homesteading CLI version #{version} successfully installed from GitHub"
else
system "gem install homesteading"
end
puts
end
|