Rakefile in ruboto-1.4.1 vs Rakefile in ruboto-1.5.0
- old
+ new
@@ -362,14 +362,14 @@
desc 'Push the gem to RubyGems'
task :release => [:clean, README_FILE, :release_docs, :gem] do
output = `git status --porcelain`
raise "Workspace not clean!\n#{output}" unless output.empty?
Dir.chdir WEB_DIR do
+ sh "git add -f #{RELEASE_BLOG}"
+ `git commit -m "* Added release blog for Ruboto #{Ruboto::VERSION}" -- #{RELEASE_BLOG}`
output = `git status --porcelain`
raise "Web workspace not clean!\n#{output}" unless output.empty?
- sh "git add -f #{RELEASE_BLOG}"
- `git commit -m "* Added release blog for Ruboto #{Ruboto::VERSION}"`
sh 'git push'
end
sh "git tag #{Ruboto::VERSION}"
sh 'git push --tags'
sh "gem push #{GEM_FILE}"
@@ -510,66 +510,66 @@
stable_gem = stable_gems.last
FileUtils.rm_rf Dir['jruby-jars-*.gem']
[[master_gem, 'master'], [stable_gem, 'jruby-1_7']].each do |gem, branch|
print "Downloading #{gem}: \r"
uri = URI("http://#{download_host}#{download_dir}/snapshots/#{branch}/#{gem}")
- done = 0
- body = ''
Net::HTTP.new(uri.host, uri.port).request_get(uri.path) do |response|
if response.code == '200'
length = response['Content-Length'].to_i
+ timestamp = response['Last-Modified'] # Sat, 23 Jan 2016 05:52:03 GMT'
+ body = ''
+ done = 0
response.read_body do |fragment|
body << fragment
done += fragment.length
unless length == 0
progress = (done * 100) / length
print "Downloading #{gem}: #{done / 1024}/#{length / 1024}KB #{progress}%\r"
end
end
+ unless body.empty?
+ File.write(gem, body)
+ FileUtils.touch gem, mtime: Time.parse(timestamp)
+ end
puts
else
raise "Unexpected HTTP response code: #{response.code.inspect}"
end
end
- File.open(gem, 'wb') { |f| f << body } unless body.empty?
end
end
task '.travis.yml' do
puts "Regenerating #{'.travis.yml'}"
source = File.read('.travis.yml')
- test_parts = 4
+ test_parts = 3
matrix = ''
allow_failures = ''
# FIXME(uwe): JRuby 1.7.13 works for Nettbuss. Keep for 2016.
# FIXME(uwe): Test all of these that work
[
- ['CURRENT', [nil]],
- ['FROM_GEM', [:MASTER, :STABLE]],
- ['STANDALONE', [:MASTER, :STABLE, '1.7.24', '1.7.13']],
+ # ['CURRENT', [nil]], # Running standalone is the most important way now
+ # ['FROM_GEM', [:MASTER, :STABLE]], # Running standalone is the most important way now
+ ['STANDALONE', [:MASTER, :STABLE, '1.7.25', '1.7.13']],
].each do |platform, versions|
versions.each do |v|
# FIXME(uwe): Test the newest and most common api levels
- # FIXME(uwe): Nettbuss uses api level 15. Keep for 2016.
+ # FIXME(uwe): Nettbuss uses api level 15. Keep for 2017.
# FIXME(uwe): https://github.com/ruboto/ruboto/issues/426
- [23, 22, 21, 19, 17, 16, 15].each do |api|
+ [23, 22, 21, 19, 17, 15].each do |api|
(1..test_parts).each do |n|
line = " - ANDROID_TARGET=#{api} RUBOTO_PLATFORM=#{platform.ljust(10)} TEST_PART=#{n}of#{test_parts}#{" JRUBY_JARS_VERSION=#{v}" if v}\n"
- next if v == :MASTER # FIXME(uwe): Remove when master branch is green.
next if api == 23 # FIXME(uwe): Remove when Android 6.0 is green. Unable to start emulator on travis.
next if api == 22 # FIXME(uwe): Remove when Android 5.1 is green. Must use slow ARM emulator due to missing HAXM.
next if api == 22 && platform == 'STANDALONE' && v == :STABLE # FIXME(uwe): Remove when Android 5.1 is green. Must use slow ARM emulator due to missing HAXM.
next if api == 21 # FIXME(uwe): Remove when Android 5.0 is green.
next if api == 17 # FIXME(uwe): Remove when Android 4.2 is green.
- next if api == 16 # FIXME(uwe): Remove when Android 4.1 is green.
- if platform == 'FROM_GEM' || # FIXME(uwe): Remove when new RubotoCore is green.
- (v == :STABLE && (platform != 'STANDALONE' || api != 15)) || # FIXME(uwe): Remove when 1.7 branch is green.
- v == '1.7.13' || # FIXME(uwe): Remove when 1.7.13 is green.
- false
- allow_failures << line.gsub('-', '- env:')
+ if v == :MASTER || v == :STABLE
+ # allow_failures << line.gsub('-', '- env:')
+ next
end
matrix << line
end
end
matrix << "\n"