Skip to content

Commit

Permalink
upgrade to 1.8.M05
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasronge committed Jul 31, 2012
1 parent bcb62d4 commit 33ed616
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 8 deletions.
19 changes: 13 additions & 6 deletions Rakefile
@@ -1,13 +1,17 @@
require "bundler/gem_tasks"

def tar_file
Dir.new('tmp').entries.find { |x| x =~ /gz$/ || x =~ /tar$/}
end

def source_file
gz_file = Dir.new('tmp').entries.find { |x| x =~ /gz$/ }
File.expand_path("./tmp/#{gz_file}")
File.expand_path("./tmp/#{tar_file}")
end

def unpack_lib_dir
gz_file = Dir.new('tmp').entries.find { |x| x =~ /gz$/ }
dir = gz_file.gsub('-unix.tar.gz', '')
file = tar_file
dir = file.gsub('-unix.tar.gz', '')
dir = dir.gsub('-unix.tar', '')
File.expand_path("./tmp/#{dir}/lib")
end

Expand All @@ -20,15 +24,18 @@ task :delete_old_jar do
root = File.expand_path("./lib/neo4j-community/jars")
files = Dir.new(root).entries.find_all{|f| f =~ /\.jar/}
files.each do |file|
system "rm #{root}/#{file}"
puts "Delete #{file}"
system "git rm #{root}/#{file}"
end
end

desc "Upgrade using downloaded ...tar.gz file in ./tmp"
task :upgrade => [:delete_old_jar] do
system "cd tmp; tar xf #{source_file}"
jars = File.expand_path("./lib/neo4j-community/jars")
puts "Jar dir #{jars}"
FileUtils.mkdir_p(jars)
test_jars = File.expand_path("./lib/neo4j-community/test-jars")
jar_files_to_copy.each {|f| system "cp #{unpack_lib_dir}/#{f} #{jars}" unless f =~ /tests/}
jar_files_to_copy.each {|f| system "cp #{unpack_lib_dir}/#{f} #{jars}; git add #{jars}/#{f}" unless f =~ /tests/}
jar_files_to_copy.each {|f| system "cp #{unpack_lib_dir}/#{f} #{test_jars}" if f =~ /tests/}
end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions lib/neo4j-community/version.rb
@@ -1,7 +1,7 @@
module Neo4j
module Community
VERSION = "1.8.M04"
NEO_VERSION = "1.8.M04"
VERSION = "1.8.M05"
NEO_VERSION = "1.8.M05"
end
end

0 comments on commit 33ed616

Please sign in to comment.