[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: build: ruby: Run 'rake gem' when gemspec is missing.
From: |
David Thompson |
Subject: |
01/02: build: ruby: Run 'rake gem' when gemspec is missing. |
Date: |
Tue, 07 Jul 2015 12:54:46 +0000 |
davexunit pushed a commit to branch master
in repository guix.
commit 76ae915ec852739644a85bce026e716553eb8790
Author: pjotrp <address@hidden>
Date: Sun Jul 5 18:00:22 2015 +0200
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 <address@hidden>
---
guix/build/ruby-build-system.scm | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
index 531cf38..fce39b8 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 <address@hidden>
+;;; Copyright © 2015 David Thompson <address@hidden>
+;;; Copyright © 2015 Pjotr Prins <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,7 +50,13 @@ directory."
(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?