Sha256: 640cbfe6f21e8e68c2ef4e3d8e3a0eed477c5ad452eaa3c32a2b767166f0fd36

Contents?: true

Size: 1.8 KB

Versions: 4

Compression:

Stored size: 1.8 KB

Contents

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with this
# work for additional information regarding copyright ownership.  The ASF
# licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
# License for the specific language governing permissions and limitations under
# the License.


require 'rubygems/package_task'


package = Gem::PackageTask.new(spec) do |pkg|
  pkg.need_tar = true
  pkg.need_zip = true
end

desc "Install Buildr from source"
task :install=>["#{package.package_dir}/#{package.gem_spec.file_name}"] do |task|
  print "Installing #{spec.name} ... "
  args = Config::CONFIG['ruby_install_name'], '-S', 'gem', 'install', "#{package.package_dir}/#{package.gem_spec.file_name}"
  args.unshift('sudo') if sudo_needed?
  sh *args
  puts "[x] Installed Buildr #{spec.version}"
end

desc "Uninstall previous rake install"
task :uninstall do |task|
  puts "Uninstalling #{spec.name} ... "
  args = Config::CONFIG['ruby_install_name'], '-S', 'gem', 'uninstall', spec.name, '--version', spec.version.to_s
  args.unshift('sudo') if sudo_needed?
  sh *args
  puts "[x] Uninstalled Buildr #{spec.version}"
end


# We also need the other packages (JRuby if building on Ruby, and vice versa)
# Must call new with block, even if block does nothing, otherwise bad things happen.
@specs.values.each do |s|
  Gem::PackageTask.new(s) { |task| }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
buildrizpack-0.2.1-java rakelib/package.rake
buildrizpack-0.2.1 rakelib/package.rake
buildrizpack-0.2-java rakelib/package.rake
buildrizpack-0.2 rakelib/package.rake