Add support for packager to build one-click installers
This commit is contained in:
parent
95844e1b51
commit
b90f9c5be0
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,3 +29,4 @@ devbin
|
|||||||
vendor/ruby
|
vendor/ruby
|
||||||
vendor
|
vendor
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
Compass.pkg
|
||||||
|
3
Gemfile
3
Gemfile
@ -2,6 +2,7 @@ source :rubygems
|
|||||||
|
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
|
unless ENV['PKG']
|
||||||
gem "cucumber", "~> 1.1.4"
|
gem "cucumber", "~> 1.1.4"
|
||||||
gem "rspec", "~>2.0.0"
|
gem "rspec", "~>2.0.0"
|
||||||
gem "rails", "~> 3.1"
|
gem "rails", "~> 3.1"
|
||||||
@ -25,4 +26,6 @@ unless ENV["CI"]
|
|||||||
gem 'guard'
|
gem 'guard'
|
||||||
gem 'guard-test'
|
gem 'guard-test'
|
||||||
gem 'guard-cucumber'
|
gem 'guard-cucumber'
|
||||||
|
gem 'packager'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
37
Rakefile
37
Rakefile
@ -1,7 +1,16 @@
|
|||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler'
|
if ENV["PKG"]
|
||||||
Bundler.setup
|
$: << File.expand_path(File.dirname(__FILE__))+"/lib"
|
||||||
require 'rake/dsl_definition' rescue nil
|
else
|
||||||
|
require 'bundler'
|
||||||
|
Bundler.setup
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require 'rake/dsl_definition'
|
||||||
|
rescue LoadError
|
||||||
|
#pass
|
||||||
|
end
|
||||||
require 'compass'
|
require 'compass'
|
||||||
|
|
||||||
# ----- Default: Testing ------
|
# ----- Default: Testing ------
|
||||||
@ -10,12 +19,17 @@ task :default => [:test, :features]
|
|||||||
|
|
||||||
require 'rake/testtask'
|
require 'rake/testtask'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
|
begin
|
||||||
require 'cucumber'
|
require 'cucumber'
|
||||||
require 'cucumber/rake/task'
|
require 'cucumber/rake/task'
|
||||||
|
|
||||||
Cucumber::Rake::Task.new(:features) do |t|
|
Cucumber::Rake::Task.new(:features) do |t|
|
||||||
t.cucumber_opts = "features --format progress"
|
t.cucumber_opts = "features --format progress"
|
||||||
end
|
end
|
||||||
|
rescue LoadError
|
||||||
|
$stderr.puts "cannot load cucumber"
|
||||||
|
end
|
||||||
|
|
||||||
Rake::TestTask.new :test do |t|
|
Rake::TestTask.new :test do |t|
|
||||||
t.libs << 'lib'
|
t.libs << 'lib'
|
||||||
@ -124,3 +138,20 @@ rescue LoadError => e
|
|||||||
puts "WARNING: #{e}"
|
puts "WARNING: #{e}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
require 'packager/rake_task'
|
||||||
|
require 'compass/version'
|
||||||
|
# Building a package:
|
||||||
|
# 1. Get packager installed and make sure your system is setup correctly according to their docs.
|
||||||
|
# 2. Make sure you are actually using a universal binary that has been nametooled.
|
||||||
|
# 3. PKG=1 OFFICIAL=1 rake packager:pkg
|
||||||
|
Packager::RakeTask.new(:pkg) do |t|
|
||||||
|
t.package_name = "Compass"
|
||||||
|
t.version = Compass::VERSION
|
||||||
|
t.domain = "compass-style.org"
|
||||||
|
t.bin_files = ["compass"]
|
||||||
|
t.resource_files = FileList["frameworks/**/*"] + ["VERSION.yml", "LICENSE.markdown"]
|
||||||
|
end
|
||||||
|
rescue LoadError => e
|
||||||
|
puts "WARNING: #{e}"
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user