Changeset 395

Show
Ignore:
Timestamp:
01/08/2008 13:58:55 (8 months ago)
Author:
why
Message:
  • Rakefile: secondary REVISION check, copy shoes/version.h into the tarball.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Rakefile

    r394 r395  
    99NAME = APPNAME.downcase.gsub(/\W+/, '') 
    1010SONAME = 'shoes' 
    11 SVN_VERSION = `svn info`[/Revision: (\d+)/, 1] rescue '1' 
     11SVN_VERSION = `svn info`[/Revision: (\d+)/, 1] rescue File.readlines(".svn/entries")[3].to_i 
    1212VERS = ENV['VERSION'] || "0.r#{SVN_VERSION}" 
    1313PKG = "#{NAME}-#{VERS}" 
     
    358358end 
    359359 
    360 task :tarball => 'bin/main.c' do 
     360task :tarball => ['bin/main.c', 'shoes/version.h'] do 
    361361  mkdir_p "pkg" 
    362362  rm_rf PKG 
     
    368368  rm_rf "#{PKG}/platform" 
    369369  cp "bin/main.c", "#{PKG}/bin/main.c" 
     370  cp "shoes/version.h", "#{PKG}/shoes/version.h" 
    370371  rewrite "Makefile", "#{PKG}/Makefile", /^(SVN_VERSION) = .+?$/, 'SVN_VERSION = \1' 
    371372  sh "tar czvf pkg/#{PKG}.tar.gz #{PKG}"