Navigation Menu

Skip to content

Commit

Permalink
Support creating tar.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 28, 2015
1 parent 9a3abb0 commit e8281fc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
*.o
*.so
*.tar.gz
/regression.*
/results/
25 changes: 25 additions & 0 deletions Rakefile
@@ -0,0 +1,25 @@
# -*- ruby -*-

package = "pgroonga"

def find_version(package)
control_content = File.read("#{package}.control")
if /^default_version\s*=\s*'(.+)'$/ =~ control_content
$1
else
nil
end
end

version = find_version(package)

archive_name = "#{package}-#{version}.tar.gz"

dist_files = `git ls-files`.split("\n")

file archive_name => dist_files do
sh("git archive --format=tar HEAD | gzip > #{archive_name}")
end

desc "Create release package"
task :dist => archive_name

0 comments on commit e8281fc

Please sign in to comment.