Navigation Menu

Skip to content

Commit

Permalink
Support source upload/download
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 28, 2015
1 parent 307f106 commit cb0ee66
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
*.tar.gz
/regression.*
/results/
/pakcages/source/
21 changes: 21 additions & 0 deletions Rakefile
@@ -1,6 +1,7 @@
# -*- ruby -*-

package = "pgroonga"
rsync_base_path = "packages@packages.groonga.org:public"

def find_version(package)
control_content = File.read("#{package}.control")
Expand Down Expand Up @@ -33,3 +34,23 @@ task :tag do
"-m", "#{package} #{version} has been released!!!")
sh("git", "push", "--tags")
end

packages_dir = "packages"

namespace :source do
rsync_path = "#{rsync_base_path}/source/#{package}"
source_dir = "#{packages_dir}/source"

directory source_dir

desc "Download sources"
task :download => source_dir do
sh("rsync", "-avz", "--progress", "#{rsync_path}/", source_dir)
end

desc "Upload sources"
task :upload => [archive_name, source_dir] do
cp(archive_name, source_dir)
sh("rsync", "-avz", "--progress", "--delete", "#{source_dir}/", rsync_path)
end
end

0 comments on commit cb0ee66

Please sign in to comment.