From 76ae915ec852739644a85bce026e716553eb8790 Mon Sep 17 00:00:00 2001 From: pjotrp Date: Sun, 5 Jul 2015 18:00:22 +0200 Subject: build: ruby: Run 'rake gem' when gemspec is missing. * guix/build/ruby-build-system.scm (build): Run 'rake gem' when there is no gemspec in the source tree. Co-Authored-By: David Thompson --- guix/build/ruby-build-system.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'guix/build') diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm index 531cf382ae..fce39b8dfd 100644 --- a/guix/build/ruby-build-system.scm +++ b/guix/build/ruby-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 David Thompson +;;; Copyright © 2015 David Thompson +;;; Copyright © 2015 Pjotr Prins ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,7 +50,13 @@ (define gitify (define build (lambda _ - (zero? (system* "gem" "build" (first-matching-file "\\.gemspec$"))))) + (match (find-files "." "\\.gemspec$") + ;; No gemspec, try 'rake gem' instead. + (() + (zero? (system* "rake" "gem"))) + ;; Build the first matching gemspec. + ((gemspec . _) + (zero? (system* "gem" "build" gemspec)))))) (define* (check #:key tests? test-target #:allow-other-keys) (if tests? -- cgit v1.2.3