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
Fulbert 2021-12-08bash completion: Complete ‘guix shell -f’....Tobias Geerinckx-Rice 2021-10-31bash completion: Complete top-level options....Tobias Geerinckx-Rice 2021-10-31bash completion: Don't hard-code "guix" binary name....Tobias Geerinckx-Rice 2021-10-25Add 'guix shell'....Ludovic Courtès 2021-10-24etc: completion: Filter gratuitous spaces from available packages....Liliana Marie Prikler 2021-10-03bash completion: Fix ‘system’ & ‘container’ subcommands....Tobias Geerinckx-Rice 2021-10-03bash completion: Complete ‘guix size’ file names....Tobias Geerinckx-Rice 2021-10-03bash completion: Complete ‘guix build’ file names....Tobias Geerinckx-Rice 2021-10-03bash completion: Complete ‘guix weather’ packages....Tobias Geerinckx-Rice 2021-10-03bash completion: Append to $COMPREPLY where possible....Tobias Geerinckx-Rice 2021-10-03bash completion: Consolidate similar $command ‘if’ branches....Tobias Geerinckx-Rice 2021-08-28zsh completion: Add missing commands and arguments....Noah Evans 2021-06-16bash_completion: Complete options for ‘guix environment’....Tobias Geerinckx-Rice 2021-06-16bash completion: Complete options for the right command....Tobias Geerinckx-Rice 2021-06-16bash completion: Really support subcommands....Tobias Geerinckx-Rice 2021-04-20import: Remove Nix importer....Ludovic Courtès 2021-02-17scripts: system: Remove 'vm-image' command....Mathieu Othacehe 2020-12-04bash completion: Complete file names after '-f' and '-l'....Ludovic Courtès 2020-09-24bash completion: Adjust to new 'guix help' output....Ludovic Courtès 2020-09-21bash completion: Complete file names after 'guix package -p'....Fulbert 2020-09-10bash completion: Restore completion for 'guix system', etc....Ludovic Courtès 2020-06-27bash completion: Complete 'guix environment' properly....Ludovic Courtès 2020-06-04bash completion: Complete sub-commands after 'guix time-machine'....Ludovic Courtès 2020-06-04bash completion: Complete file names after '-p' and '-C'....Ludovic Courtès 2020-05-13mailmap: Update entries for Nikita....nikita