Stephen
8 years ago
committed by
Fredrik Fornwall
5 changed files with 30 additions and 1 deletions
@ -0,0 +1,6 @@ |
|||
language: ruby |
|||
sudo: required |
|||
services: |
|||
- docker |
|||
before_script: mkdir debs && chmod 777 debs |
|||
|
@ -0,0 +1,4 @@ |
|||
source 'https://rubygems.org' |
|||
|
|||
gem 'rake' |
|||
gem 'rugged' |
@ -0,0 +1,18 @@ |
|||
require 'rugged' |
|||
|
|||
task default: %w[build] |
|||
|
|||
task :build do |
|||
repo = Rugged::Repository.new('.') |
|||
commit = repo.head.target |
|||
parent = commit.parents.first |
|||
paths = commit.diff(parent).deltas.map { |d| d.new_file[:path] } |
|||
paths = paths.map { |p| Pathname.new(p).each_filename.to_a } |
|||
# looking for packages/[package]/... |
|||
packages = paths.map { |p| p[1] if p.length > 2 and p[0] == "packages" } |
|||
packages = packages.flatten.uniq |
|||
packages.each do |package| |
|||
puts package |
|||
printf `./scripts/run-docker.sh ./build-package.sh #{package}` |
|||
end |
|||
end |
Loading…
Reference in new issue