;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Xinglu Chen . (define-module (test-import-git) #:use-module (git) #:use-module (guix git) #:use-module (guix tests) #:use-module (guix packages) #:use-module (guix import git) #:use-module (guix git-download) #:use-module (gui
aboutsummaryrefslogtreecommitdiff
path: root/gnu/artwork.scm
blob: 23b98993840a0cee76ebe4b4f2b33e8783fbcf29 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu artwork)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:export (%artwork-repository))

;;; Commentary:
;;;
;;; Common place for the definition of the Guix artwork repository.
;;;
;;; Code:

(define %artwork-repository
  (let ((commit "4c7f2ce6428a63e202cd2a9474a06f68a946934d"))
    (origin
      (method git-fetch)
      (uri (git-reference
             (url "https://git.savannah.gnu.org/git/guix/guix-artwork.git")
             (commit commit)))
      (file-name (string-append "guix-artwork-" (string-take commit 7)
                                "-checkout"))
      (sha256
       (base32
        "1rl569759q9wm1dxn7nkq3873d2k92giic7aa6jwzwr3n16prc7y")))))

;;; artwork.scm ends here
rc1" "Release candidate for 2.0.0")) (let ((package (make-package directory "1.0.0" '((accept-pre-releases? . #t) (release-tag-prefix . "version-"))))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: accept pre-releases, and custom suffix" "2.0.0-rc1" (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "2.0.0-rc1-suffix" "Release candidate for 2.0.0")) (let ((package (make-package directory "1.0.0" '((accept-pre-releases? . #t) (release-tag-suffix . "-suffix"))))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: accept pre-releases, delimiter conflicts with pre-release part" "2.0.0_alpha" (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "2_0_0_alpha" "Alpha release for 2.0.0")) (let ((package (make-package directory "1.0.0" '((accept-pre-releases? . #t) (release-tag-version-delimiter . "_"))))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: accept pre-releases, and custom suffix and prefix" "2.0.0-alpha" (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "prefix123-2.0.0-alpha-suffix" "Alpha release for 2.0.0")) (let ((package (make-package directory "1.0.0" '((accept-pre-releases? . #t) (release-tag-prefix . "prefix[0-9]{3}-") (release-tag-suffix . "-suffix"))))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: accept pre-releases, and custom suffix, prefix, and delimiter" "2.0.0-alpha" (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "prefix123-2-0-0-alpha-suffix" "Alpha release for 2.0.0")) (let ((package (make-package directory "1.0.0" '((accept-pre-releases? . #t) (release-tag-prefix . "prefix[0-9]{3}-") (release-tag-suffix . "-suffix") (release-tag-version-delimiter . "-"))))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: accept pre-releases, no delimiter, and custom suffix, prefix" "2alpha" (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "prefix123-2alpha-suffix" "Alpha release for version 2")) (let ((package (make-package directory "1.0.0" '((accept-pre-releases? . #t) (release-tag-prefix . "prefix[0-9]{3}-") (release-tag-suffix . "-suffix") (release-tag-version-delimiter . ""))))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: no tags found" #f (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit")) (let ((package (make-package directory "1.0.0"))) (latest-git-tag-version package)))) (unless (which (git-command)) (test-skip 1)) (test-equal "latest-git-tag-version: no valid tags found" #f (with-temporary-git-repository directory '((add "a.txt" "A") (commit "First commit") (tag "Test" "Test tag")) (let ((package (make-package directory "1.0.0"))) (latest-git-tag-version package)))) (test-end "git")