Skip to content

Commit

Permalink
Add package:check task for running some sanity checks before release.
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Nov 30, 2010
1 parent 1414e3c commit 683cf7d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build/packaging.rb
Expand Up @@ -21,6 +21,15 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

task 'package:check' do
require 'phusion_passenger'

File.read("ext/common/Constants.h") =~ /PASSENGER_VERSION \"(.+)\"/
if $1 != PhusionPassenger::VERSION_STRING
abort "Version number in ext/common/Constants.h doesn't match."
end
end

spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.homepage = "http://www.modrails.com/"
Expand Down Expand Up @@ -85,7 +94,9 @@
end

Rake::Task['package'].prerequisites.unshift(:doc)
Rake::Task['package'].prerequisites.unshift('package:check')
Rake::Task['package:gem'].prerequisites.unshift(:doc)
Rake::Task['package:gem'].prerequisites.unshift('package:check')
Rake::Task['package:force'].prerequisites.unshift(:doc)
task :clobber => :'package:clean'

Expand Down Expand Up @@ -166,7 +177,7 @@
end

desc "Create a Debian package"
task 'package:debian' => :fakeroot do
task 'package:debian' => [:fakeroot, 'package:check'] do
if Process.euid != 0
STDERR.puts
STDERR.puts "*** ERROR: the 'package:debian' task must be run as root."
Expand Down

0 comments on commit 683cf7d

Please sign in to comment.