chiark / gitweb /
apache2: update from 2.4.26 to 2.4.27
[termux-packages] / Rakefile
1 require 'rugged'
2
3 task default: %w[build]
4
5 task :build do
6   repo = Rugged::Repository.new('.')
7   commit = repo.head.target
8   parent = commit.parents.first
9   paths = commit.diff(parent).deltas.map { |d| d.new_file[:path] }
10   paths = paths.map { |p| Pathname.new(p).each_filename.to_a }
11   # looking for packages/[package]/...
12   packages = paths.map { |p| p[1] if p.length > 2 and p[0] == "packages" }
13   packages = packages.flatten.uniq
14   packages.each do |package|
15     puts package
16     printf `./scripts/run-docker.sh ./build-package.sh #{package}`
17   end
18 end