aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2018, 2022 Ludovic Courtès <ludo@gnu.org>
#
# 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/>.

#
# Test 'guix describe'.
#

guix describe --version

tmpfile="t-guix-describe-$$"
trap "rm -f $tmpfile" EXIT
rm -f "$tmpfile"

if [ -d "$abs_top_srcdir/.git" ]
then
    # Since we're in a Git checkout, we can at least check that these things
    # work.
    guix describe | grep -i "checkout"
    if git --version > /dev/null 2>&1
    then
	result="`guix describe | grep commit: | cut -d : -f 2-`"
	commit="`git log | head -1 | cut -c 7-`"
	test "x$result" = "x$commit"
    fi
    guix describe -f channels
    case "`guix describe -f channels | grep url`" in
	*"(url \"$abs_top_srcdir/\")") true;;
	*) false;;
    esac
else
    exit 77
fi
>Ludovic Courtès 2018-02-27build: Really build 'guix offload' when possible....Ludovic Courtès 2018-02-26build: Require Guile >= 2.0.13....Ludovic Courtès 2018-01-07daemon: Make libbz2 an optional dependency....Ludovic Courtès 2018-01-07daemon: Add gzip log compression....Ludovic Courtès 2017-02-06config-daemon.ac: detect host AR...Sergei Trofimovich 2016-11-25offload: Use Guile-SSH instead of GNU lsh....Ludovic Courtès 2016-11-16daemon: Add "builtin:download" derivation builder....Ludovic Courtès 2016-07-16build: Substitute URLs now default to "mirror.hydra.gnu.org" alone....Ludovic Courtès 2016-03-19build: Protect against misconfiguration of localstatedir....Ludovic Courtès 2016-03-16build: Default to "https://mirror.hydra.gnu.org/" for substitutes....Ludovic Courtès 2015-12-09build: Always check for gzip/bzip2/xz....Ludovic Courtès 2015-10-09build: Fix libgcrypt detection on FHS systems....Ludovic Courtès 2015-06-03Merge branch 'nix'....Ludovic Courtès 2015-05-19build: Make sure $CXX supports C++11....Ludovic Courtès 2015-03-25Rename 'guix substitute-binary' to 'guix substitute'....Ludovic Courtès 2015-02-24build: Reject or warn against file name length limit overruns....Ludovic Courtès 2015-02-04build: Make 'chroot' a hard requirement....Ludovic Courtès 2015-01-04build: Check for <tr1/unordered_set>, now used by the daemon....Ludovic Courtès 2014-09-02daemon: Do not use 'vfork'....Ludovic Courtès 2014-05-17build: Add --with-libgcrypt-libdir=DIR to support Debian's multi-arch layout....Ludovic Courtès 2014-04-24build: Add missing function checks for optional daemon features....Ludovic Courtès 2014-01-24Add 'guix offload' as a daemon build hook....Ludovic Courtès 2013-12-20daemon: Implement signed archive import/export....Ludovic Courtès 2013-05-12build: Use separate `AC_CONFIG_FILES' invocations for executable files....Ludovic Courtès 2013-04-12substitute-binary: Implement `--substitute'....Ludovic Courtès 2013-04-03Add preliminary binary substituter....Ludovic Courtès