From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id II5ZIP1jcWOJJQAAbAwnHQ (envelope-from ) for ; Sun, 13 Nov 2022 22:39:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UGd5H/1jcWPOfgAAG6o9tA (envelope-from ) for ; Sun, 13 Nov 2022 22:39:09 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1605C27B0A for ; Sun, 13 Nov 2022 22:39:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouKgx-0002eu-32; Sun, 13 Nov 2022 16:39:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouKgw-0002el-BD for guix-patches@gnu.org; Sun, 13 Nov 2022 16:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ouKgw-0002Kt-3M for guix-patches@gnu.org; Sun, 13 Nov 2022 16:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ouKgv-0002z6-Ti for guix-patches@gnu.org; Sun, 13 Nov 2022 16:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59254] [PATCH v2] scripts: describe: Add branch information to json output. References: <20221113213101.27519-1-jgart@dismail.de> In-Reply-To: <20221113213101.27519-1-jgart@dismail.de> Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Nov 2022 21:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59254 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59254@debbugs.gnu.org Cc: jgart Received: via spool by 59254-submit@debbugs.gnu.org id=B59254.166837550111425 (code B ref 59254); Sun, 13 Nov 2022 21:39:01 +0000 Received: (at 59254) by debbugs.gnu.org; 13 Nov 2022 21:38:21 +0000 Received: from localhost ([127.0.0.1]:48520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouKgH-0002yD-4l for submit@debbugs.gnu.org; Sun, 13 Nov 2022 16:38:21 -0500 Received: from mx1.dismail.de ([78.46.223.134]:38150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouKgF-0002y1-65 for 59254@debbugs.gnu.org; Sun, 13 Nov 2022 16:38:19 -0500 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 567d65e1 for <59254@debbugs.gnu.org>; Sun, 13 Nov 2022 22:38:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=ikU62+9Ej5vDDDqkWsBvo vMzk9I4rWufY7HW1gNHONY=; b=GGiN0+PGCF9rZxjXAUzQfoI9wO5mEr7KXew8m GZrd9zmCBHmwaA9g67/WkoVB+gxXCVolKEysjHFd9qNs4uTlgu7QvZXmwphSka8U D+NqvtNA/OIC54ZFc4PG12zdmfLM6uXcrei6mfkJp1qwhgiv8xtz6X4AQFNmNrfV KllYBa5KFxd6G/O4j5oGDIRss88Z6coUMDplaYobFKcEDY9NUOeg9wzq0yOXdBcd 01YSmYIjy1LR0KXGTY87+W0CCXpY/b+S9Nxbu3hC4Qr1luOcPZCSsysLSIhU4O1H WORrFQ6J9XmWwwNh4njzf7ASNCfl/GlVWxV+d5+djxHi7Qmdg== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 99b83d11 for <59254@debbugs.gnu.org>; Sun, 13 Nov 2022 22:38:12 +0100 (CET) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id eabe7a76 for <59254@debbugs.gnu.org>; Sun, 13 Nov 2022 22:38:12 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 090b28cd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 13 Nov 2022 22:38:06 +0100 (CET) Date: Sun, 13 Nov 2022 15:35:49 -0600 Message-Id: <20221113213548.28168-1-jgart@dismail.de> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: jgart X-ACL-Warn: , jgart via Guix-patches From: jgart via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668375549; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tM9GvURtERYVCMsQRkB6yNi5C6kF7MNM4ndHdE2kP0o=; b=lKfn2qBg5Zb5B9BEXLz0SpSJP3tsFxLqVjH948uRCxGO5By72AzDSmLqFJ+omUyPpsTNgT 771mkVhe3+yzU4hr+3yvSPtmWkqwlI4nrZvr4M5RUalmvf1rHL34O8rU/MZXAyfX83OJkO fkZP3XAryekPwLI3yDud6swdQEih+U1aM3psybdRFZQyoZsXWblSxU3qgQOk689pFlXKss /hMKuh5SsP/M4h9KHiW5ZQtOoUPnnBLP/dkQwPBlcLGDRrdJoihfY6PgRF5AHS56HdXpGh ONK9GkhJQPvipqOtRBDrhEWtQFDt1UxlkSN3bFJaEUk6I6cxq4wQxutcRsbXjw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668375549; a=rsa-sha256; cv=none; b=og0kqfL+VtL/bnbIaB/Z/Shr0NuJGmCUL94ELIWX4tCAuYEX5U1Bs22QtQZtofA++GLucK 8tIc4juSfLRE2H6RcRsQUzZgbyu+R2pG+TLaFk5szvHEsJfPSp3okuXYMd+GGVIzh6/xfl afdHCuHc0exOveE2lobGE8y0wYTzB7H79Ja3lsaadeVa0Qcf2aohaKJXOR4plCD+ToAbaV OCgaqz5I8oZknj6quB4+TI+L/nVjz4SXTexTp97mqZtL+w+ZTMIRkq5vGYrs1XtClGTqVI IzspUpQFvnj9Nh3c/lxHuQQD1t1hg4Pa649NnT9dR3H2SSK+1prlCLicz29new== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=GGiN0+PG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.15 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=GGiN0+PG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1605C27B0A X-Spam-Score: -2.15 X-Migadu-Scanner: scn1.migadu.com X-TUID: kNmmgsh9CMbU * guix/scripts/describe.scm (channel->json): Add branch information. This patch adds branch information to the json output. Here's an example of the output: $ guix-shell ./pre-inst-env guix describe -f json | jq { "name": "guix", "url": "/home/jgart/dc2e8ad5-c818-41a4-ac33-198f11f868b2-guix/", "branch": "master", "commit": "a720eacc803d6e078ea07613ba5ab5ef59adcbb5", "introduction": { "commit": "9edb3f66fd807b096b48283debdcddccfea34bad", "signer": "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA" } } v2 just adds my copyright statement at the top of the file. all best, jgart --- guix/scripts/describe.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm index 0c310e3da8..e2233c78a5 100644 --- a/guix/scripts/describe.scm +++ b/guix/scripts/describe.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Ekaitz Zarraga ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2022 jgart ;;; ;;; This file is part of GNU Guix. ;;; @@ -119,6 +120,7 @@ (define (channel->json channel) (let ((intro (channel-introduction channel))) `((name . ,(channel-name channel)) (url . ,(channel-url channel)) + (branch . ,(channel-branch channel)) (commit . ,(channel-commit channel)) ,@(if intro `((introduction -- 2.38.1