Sha256: 1ba107fad3229626c274c5219648690f96b40fa442fbe16acb1df8de8f3f7ccf

Contents?: true

Size: 1.69 KB

Versions: 22

Compression:

Stored size: 1.69 KB

Contents

require 'tasks/config'

#-------------------------------------------------------------------------------
# Distribution and Packaging
#-------------------------------------------------------------------------------
if pkg_config = Configuration.for_if_exist?("packaging") then

  require 'gemspec'
  require 'rake/gempackagetask'
  require 'rake/contrib/sshpublisher'

  namespace :dist do

    Rake::GemPackageTask.new(Amalgalite::GEM_SPEC) do |pkg|
      pkg.need_tar = pkg_config.formats.tgz
      pkg.need_zip = pkg_config.formats.zip
    end

    desc "Install as a gem"
    task :install => [:clobber, :package] do
      sh "sudo gem install --local pkg/#{Amalgalite::GEM_SPEC.full_name}.gem"
    end

    desc "Uninstall gem"
    task :uninstall do 
      sh "sudo gem uninstall -i #{Amalgalite::GEM_SPEC.name} -x"
    end

    desc "dump gemspec"
    task :gemspec do
      puts Amalgalite::GEM_SPEC.to_ruby
    end

    desc "reinstall gem"
    task :reinstall => [:uninstall, :repackage, :install]

    desc "package the windows gem"
    task :package_win => "ext:build_win" do
      cp "ext/amalgalite3.so", "lib", :verbose => true
      Gem::Builder.new( Amalgalite::GEM_SPEC_WIN ).build
      mv Dir["*.gem"].first, "pkg"
    end

    desc "distribute copiously"
    task :copious => [:package, :package_win] do
        gems = Amalgalite::SPECS.collect { |s| "#{s.full_name}.gem" }
        Rake::SshFilePublisher.new('jeremy@copiousfreetime.org',
                               '/var/www/vhosts/www.copiousfreetime.org/htdocs/gems/gems',
                               'pkg', *gems).upload
        sh "ssh jeremy@copiousfreetime.org rake -f /var/www/vhosts/www.copiousfreetime.org/htdocs/gems/Rakefile"
    end
 end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
amalgalite-0.5.0-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.4.2 tasks/distribution.rake
amalgalite-0.4.2-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.5.1 tasks/distribution.rake
amalgalite-0.5.0 tasks/distribution.rake
amalgalite-0.5.1-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.6.0-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.0-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.0 tasks/distribution.rake
amalgalite-0.6.0 tasks/distribution.rake
amalgalite-0.7.3-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.3 tasks/distribution.rake
amalgalite-0.7.1-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.1 tasks/distribution.rake
amalgalite-0.7.4-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.4 tasks/distribution.rake
amalgalite-0.7.5-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.5 tasks/distribution.rake
amalgalite-0.7.6-x86-mswin32-60 tasks/distribution.rake
amalgalite-0.7.7-x86-mswin32-60 tasks/distribution.rake