Travis pkg builds (#1119)

This commit is contained in:
Stephen 2017-07-09 15:05:36 -07:00 committed by Fredrik Fornwall
parent 5e29b6bbb4
commit 3ae0eb3a87
5 changed files with 30 additions and 1 deletions

6
.travis.yml Normal file
View File

@ -0,0 +1,6 @@
language: ruby
sudo: required
services:
- docker
before_script: mkdir debs && chmod 777 debs

4
Gemfile Normal file
View File

@ -0,0 +1,4 @@
source 'https://rubygems.org'
gem 'rake'
gem 'rugged'

18
Rakefile Normal file
View File

@ -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

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://beyondgrep.com/
TERMUX_PKG_DESCRIPTION="Tool like grep optimized for programmers"
TERMUX_PKG_VERSION=2.18
# Depend on coreutils for bin/env.
# Depend on coreutils for bin/env
TERMUX_PKG_DEPENDS="perl, coreutils"
TERMUX_PKG_PLATFORM_INDEPENDENT=yes

View File

@ -3,3 +3,4 @@ TERMUX_PKG_DESCRIPTION="Programs (cmd, diff, diff3 and sdiff) related to finding
TERMUX_PKG_VERSION=3.6
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/diffutils/diffutils-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=d621e8bdd4b573918c8145f7ae61817d1be9deb4c8d2328a65cea8e11d783bd6