guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: website: Handle 'GUIX_WEB_SITE_LOCAL' in a unifor


From: Ludovic Courtčs
Subject: branch master updated: website: Handle 'GUIX_WEB_SITE_LOCAL' in a uniform way.
Date: Mon, 25 Oct 2021 08:05:47 -0400

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix-artwork.

The following commit(s) were added to refs/heads/master by this push:
     new c77c36b  website: Handle 'GUIX_WEB_SITE_LOCAL' in a uniform way.
c77c36b is described below

commit c77c36bfaea6c0187642c8e9cd2699517c29a7f5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Oct 25 14:02:32 2021 +0200

    website: Handle 'GUIX_WEB_SITE_LOCAL' in a uniform way.
    
    This is a followup to c2c8e26f3b95a5ee7fe384da1b1f9e235b80cc08.
    
    * website/apps/base/utils.scm (guix-root-url-path): Explicitly check for
    "yes".
    * website/apps/packages/data.scm (%package-list): Correctly deal with
    unset GUIX_WEB_SITE_LOCAL.
---
 website/apps/base/utils.scm    | 6 +++---
 website/apps/packages/data.scm | 5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/website/apps/base/utils.scm b/website/apps/base/utils.scm
index 0ca773d..1e46d45 100644
--- a/website/apps/base/utils.scm
+++ b/website/apps/base/utils.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix web site
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès 
<ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic 
Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
 ;;; Copyright © 2013 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
@@ -51,9 +51,9 @@
 
 (define guix-root-url-path
   ;; Path to GNU Guix site at guix.gnu.org.
-  (let ((path (cond
+  (let ((path (match (getenv "GUIX_WEB_SITE_LOCAL")
                ;; If we are trying out the website locally, use "/" as the 
root.
-               ((getenv "GUIX_WEB_SITE_LOCAL") "/")
+               ("yes" "/")
                (else (or (getenv "GUIX_WEB_SITE_ROOT_PATH") "/")))))
     (make-parameter
      path
diff --git a/website/apps/packages/data.scm b/website/apps/packages/data.scm
index eb34d26..c80d979 100644
--- a/website/apps/packages/data.scm
+++ b/website/apps/packages/data.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix web site
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès 
<ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2021 Ludovic Courtès 
<ludo@gnu.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
 ;;; Copyright © 2013 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
@@ -50,7 +50,8 @@
                    (string<? (package-name p1)
                              (package-name p2))))))
       (cond ((null? packages) '())
-            ((string=? "yes" (getenv "GUIX_WEB_SITE_LOCAL"))
+            ((string=? "yes"
+                       (or (getenv "GUIX_WEB_SITE_LOCAL") "no"))
              (list-head packages 300))
             (else packages)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]