Commit b9c3f60a authored by Ed Reel's avatar Ed Reel

Replace nvm with nodebrew dependency

parent a09c6b30
......@@ -7,23 +7,18 @@ class Heroku < Package
source_url 'https://github.com/heroku/cli/archive/v6.13.6.tar.gz'
source_sha256 '395c7e22d16b1fce2d5ed4ac1e022dbd3c9aa8fdbc172d9dadf86ba9c1ad6978'
depends_on 'nvm'
depends_on 'nodebrew' unless `node --version`
depends_on 'yarn'
def self.build
system '\. ~/.bashrc && nvm install stable && yarn install'
system 'nodebrew install-binary latest && nodebrew use latest' unless `node --version`
system 'yarn install'
end
def self.install
system "mkdir -p #{CREW_DEST_DIR}#{CREW_LIB_PREFIX}/heroku"
system "cp -r . #{CREW_DEST_DIR}#{CREW_LIB_PREFIX}/heroku"
system "mkdir -p #{CREW_DEST_DIR}#{CREW_PREFIX}/bin"
system "mkdir -p #{CREW_DEST_DIR}#{CREW_PREFIX}/share/heroku"
system "cp -r . #{CREW_DEST_DIR}#{CREW_PREFIX}/share/heroku"
FileUtils.cd("#{CREW_DEST_DIR}#{CREW_PREFIX}/bin") do
system "ln -s /usr/local/share/heroku/bin/run heroku"
end
puts ""
puts "To finish the installation, execute the following:".lightblue
puts "source ~/.bashrc".lightblue
puts ""
system "ln -s #{CREW_LIB_PREFIX}/heroku/bin/run #{CREW_DEST_DIR}#{CREW_PREFIX}/bin/heroku"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment