lib/vulcan/cli.rb in vulcan-0.5.0 vs lib/vulcan/cli.rb in vulcan-0.6.0
- old
+ new
@@ -19,26 +19,26 @@
if no COMMAND is specified, a sensible default will be chosen for you
DESC
method_option :command, :aliases => "-c", :desc => "the command to run for compilation"
- method_option :name, :aliases => "-n", :desc => "the name of the library (defaults ot the directory name)"
+ method_option :name, :aliases => "-n", :desc => "the name of the library (defaults to the directory name)"
method_option :output, :aliases => "-o", :desc => "output build artifacts to this file"
method_option :prefix, :aliases => "-p", :desc => "the build/install --prefix of the software"
method_option :source, :aliases => "-s", :desc => "the source directory to build from"
- method_option :deps, :aliases => "-d", :desc => "other vulcan compiled libraries to build with"
+ method_option :deps, :aliases => "-d", :desc => "urls of vulcan compiled libraries to build with", :type=>:array
method_option :verbose, :aliases => "-v", :desc => "show the full build output", :type => :boolean
def build
app = read_config[:app] || "need a server first, use vulcan create"
source = options[:source] || Dir.pwd
name = options[:name] || File.basename(source)
output = options[:output] || "/tmp/#{name}.tgz"
prefix = options[:prefix] || "/app/vendor/#{name}"
command = options[:command] || "./configure --prefix #{prefix} && make install"
- deps = options[:deps] || ""
+ deps = options[:deps] || []
server = URI.parse(ENV["MAKE_SERVER"] || "http://#{app}.herokuapp.com")
Dir.mktmpdir do |dir|
puts ">> Packaging local directory"
%x{ cd #{source} && tar czvf #{dir}/input.tgz . 2>&1 }
@@ -121,11 +121,10 @@
system "git init"
system "git remote add heroku git@#{heroku_git_domain}:#{config[:app]}.git"
FileUtils.cp_r "#{server_path}/.", "."
File.open(".gitignore", "w") do |file|
file.puts ".env"
- file.puts "node_modules"
end
%x{ env BUNDLE_GEMFILE= heroku config:remove BUILDPACK_URL 2>&1 }
system "git add . >/dev/null"
@@ -167,10 +166,10 @@
end
def server_path
File.expand_path("../../../server", __FILE__)
end
-
+
#
# heroku_git_domain checks to see if the heroku-accounts plugin is present,
# and if so, it will set the domain to the one that matches the credentials
# for the currently set account
#