Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 5447 Bytes
1 | require 'rubygems' |
2 | require 'rake' |
3 | require 'rake/testtask' |
4 | require 'rake/rdoctask' |
5 | require 'rake/contrib/sshpublisher' |
6 | |
7 | require "./lib/syntax/version" |
8 | |
9 | PACKAGE_NAME = "syntax" |
10 | PACKAGE_VERSION = Syntax::Version::STRING |
11 | |
12 | SOURCE_FILES = FileList.new do |fl| |
13 | [ "lib", "test" ].each do |dir| |
14 | fl.include "#{dir}/**/*" |
15 | end |
16 | fl.include "Rakefile" |
17 | end |
18 | |
19 | PACKAGE_FILES = FileList.new do |fl| |
20 | [ "api", "doc" ].each do |dir| |
21 | fl.include "#{dir}/**/*" |
22 | end |
23 | fl.include "NEWS", "LICENSE", "#{PACKAGE_NAME}.gemspec" |
24 | fl.include "README", "setup.rb" |
25 | fl.include SOURCE_FILES |
26 | end |
27 | |
28 | Gem.manage_gems |
29 | |
30 | def can_require( file ) |
31 | begin |
32 | require file |
33 | return true |
34 | rescue LoadError |
35 | return false |
36 | end |
37 | end |
38 | |
39 | desc "Default task" |
40 | task :default => [ :test ] |
41 | |
42 | desc "Build documentation" |
43 | task :doc => [ :rdoc, :manual ] |
44 | |
45 | task :rdoc => SOURCE_FILES |
46 | |
47 | desc "Clean generated files" |
48 | task :clean do |
49 | rm_rf "coverage" |
50 | rm_rf "pkg" |
51 | rm_rf "api" |
52 | rm_rf "doc/manual-html" |
53 | rm_f "ChangeLog" |
54 | end |
55 | |
56 | Rake::TestTask.new do |t| |
57 | t.test_files = [ "test/ALL-TESTS.rb" ] |
58 | t.verbose = true |
59 | end |
60 | |
61 | desc "Prepackage warnings and reminders" |
62 | task :prepackage do |
63 | unless ENV["OK"] == "yes" |
64 | puts "=========================================================" |
65 | puts "Please check that the following files have been updated" |
66 | puts "in preparation for this release:" |
67 | puts |
68 | puts " NEWS (with latest release notes)" |
69 | puts " lib/syntax/version.rb (with current version number)" |
70 | puts |
71 | puts " http://rpa-base.rubyforge.org/wiki/wiki.cgi?DeveloperChecklist" |
72 | puts " http://rpa-base.rubyforge.org/wiki/wiki.cgi?GoodAPIDesign" |
73 | puts " http://rpa-base.rubyforge.org/wiki/wiki.cgi?GoodPractices" |
74 | puts |
75 | puts " tag v#{Syntax::Version::MAJOR}_#{Syntax::Version::MINOR}_#{Syntax::Version::TINY}" |
76 | puts |
77 | puts "If you are sure these have all been taken care of, re-run" |
78 | puts "rake with 'OK=yes'." |
79 | puts "=========================================================" |
80 | puts |
81 | |
82 | abort |
83 | end |
84 | end |
85 | |
86 | desc "Tag the current trunk with the current release version" |
87 | task :tag do |
88 | warn "WARNING: this will tag http://svn.jamisbuck.org/syntax/trunk using the tag v#{Syntax::Version::MAJOR}_#{Syntax::Version::MINOR}_#{Syntax::Version::TINY}" |
89 | warn "If you do not wish to continue, you have 5 seconds to cancel by pressing CTRL-C..." |
90 | 5.times { |i| print "#{5-i} "; $stdout.flush; sleep 1 } |
91 | system "svn copy http://svn.jamisbuck.org/syntax/trunk http://svn.jamisbuck.org/syntax/tags/v#{Syntax::Version::MAJOR}_#{Syntax::Version::MINOR}_#{Syntax::Version::TINY} -m \"Tagging the #{Syntax::Version::STRING} release\"" |
92 | end |
93 | |
94 | package_name = "#{PACKAGE_NAME}-#{PACKAGE_VERSION}" |
95 | package_dir = "pkg" |
96 | package_dir_path = "#{package_dir}/#{package_name}" |
97 | |
98 | gz_file = "#{package_name}.tar.gz" |
99 | bz2_file = "#{package_name}.tar.bz2" |
100 | zip_file = "#{package_name}.zip" |
101 | gem_file = "#{package_name}.gem" |
102 | |
103 | task :gzip => SOURCE_FILES + [ :rdoc, :manual, "#{package_dir}/#{gz_file}" ] |
104 | task :bzip => SOURCE_FILES + [ :rdoc, :manual, "#{package_dir}/#{bz2_file}" ] |
105 | task :zip => SOURCE_FILES + [ :rdoc, :manual, "#{package_dir}/#{zip_file}" ] |
106 | task :gem => SOURCE_FILES + [ :manual, "#{package_dir}/#{gem_file}" ] |
107 | |
108 | desc "Build all packages" |
109 | task :package => [ :prepackage, :test, :gzip, :bzip, :zip, :gem ] |
110 | |
111 | directory package_dir |
112 | |
113 | file package_dir_path do |
114 | mkdir_p package_dir_path rescue nil |
115 | PACKAGE_FILES.each do |fn| |
116 | f = File.join( package_dir_path, fn ) |
117 | if File.directory?( fn ) |
118 | mkdir_p f unless File.exist?( f ) |
119 | else |
120 | dir = File.dirname( f ) |
121 | mkdir_p dir unless File.exist?( dir ) |
122 | rm_f f |
123 | safe_ln fn, f |
124 | end |
125 | end |
126 | end |
127 | |
128 | file "#{package_dir}/#{zip_file}" => package_dir_path do |
129 | rm_f "#{package_dir}/#{zip_file}" |
130 | chdir package_dir do |
131 | sh %{zip -r #{zip_file} #{package_name}} |
132 | end |
133 | end |
134 | |
135 | file "#{package_dir}/#{gz_file}" => package_dir_path do |
136 | rm_f "#{package_dir}/#{gz_file}" |
137 | chdir package_dir do |
138 | sh %{tar czvf #{gz_file} #{package_name}} |
139 | end |
140 | end |
141 | |
142 | file "#{package_dir}/#{bz2_file}" => package_dir_path do |
143 | rm_f "#{package_dir}/#{bz2_file}" |
144 | chdir package_dir do |
145 | sh %{tar cjvf #{bz2_file} #{package_name}} |
146 | end |
147 | end |
148 | |
149 | file "#{package_dir}/#{gem_file}" => package_dir do |
150 | spec = eval(File.read(PACKAGE_NAME+".gemspec")) |
151 | Gem::Builder.new(spec).build |
152 | mv gem_file, "#{package_dir}/#{gem_file}" |
153 | end |
154 | |
155 | rdoc_dir = "api" |
156 | |
157 | desc "Build the RDoc API documentation" |
158 | Rake::RDocTask.new( :rdoc ) do |rdoc| |
159 | rdoc.rdoc_dir = rdoc_dir |
160 | rdoc.title = "Syntax -- A library for syntax highlighting source code" |
161 | rdoc.options << '--line-numbers --inline-source --main README' |
162 | rdoc.rdoc_files.include 'README' |
163 | rdoc.rdoc_files.include 'lib/**/*.rb' |
164 | |
165 | if can_require( "rdoc/generators/template/html/jamis" ) |
166 | rdoc.template = "jamis" |
167 | end |
168 | end |
169 | |
170 | desc "Generate the manual" |
171 | task :manual => [ "doc/manual-html/index.html" ] |
172 | |
173 | file "doc/manual-html/index.html" => [ "doc/manual/manual.yml" ] do |
174 | cd( "doc/manual" ) { ruby "manual.rb ../manual-html" } |
175 | end |
176 | |
177 | desc "Publish the API documentation" |
178 | task :pubrdoc => [ :rdoc ] do |
179 | Rake::SshDirPublisher.new( |
180 | "minam@rubyforge.org", |
181 | "/var/www/gforge-projects/net-ssh/api", |
182 | "api" ).upload |
183 | end |
184 | |
185 | desc "Publish the user's manual" |
186 | task :pubman => [ :manual ] do |
187 | Rake::SshDirPublisher.new( |
188 | "minam@rubyforge.org", |
189 | "/var/www/gforge-projects/syntax", |
190 | "doc/manual-html" ).upload |
191 | end |
192 | |
193 | desc "Publish the documentation" |
194 | task :pubdoc => [:pubrdoc, :pubman] |