mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <mol@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] ptxd_make_vcs_version: add script to determine vcs hash
Date: Fri, 09 Apr 2021 15:33:17 +0200	[thread overview]
Message-ID: <E1lUrG9-005xws-1a@dude03.red.stw.pengutronix.de> (raw)
In-Reply-To: <20210401083641.9251-1-s.trumtrar@pengutronix.de>

Thanks, applied as 669c4e26a1ccaeff28b0d21dbf9c079560d85fef.

Michael

[sent from post-receive hook]

On Fri, 09 Apr 2021 15:33:17 +0200, Steffen Trumtrar <s.trumtrar@pengutronix.de> wrote:
> Add a script to determine a uniquely abbreviated commit object of the
> current bsp state. The information is exported to the variable
> PTXDIST_VCS_VERSION so it can be used from other scripts and rules.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> Message-Id: <20210401083641.9251-1-s.trumtrar@pengutronix.de>
> [mol: drop unnecessary 'echo']
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/scripts/lib/ptxd_make_vcs_version.sh b/scripts/lib/ptxd_make_vcs_version.sh
> new file mode 100644
> index 000000000000..69e486ab31a5
> --- /dev/null
> +++ b/scripts/lib/ptxd_make_vcs_version.sh
> @@ -0,0 +1,21 @@
> +#!/bin/bash
> +#
> +# Copyright (C) 2020 by Steffen Trumtrar <s.trumtrar@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +ptxd_make_vcs_version() {
> +    PTXDIST_VCS_VERSION="$(git describe 2>/dev/null || \
> +			   git describe --always --tags 2>/dev/null)"
> +
> +    if [ -z "${PTXDIST_VCS_VERSION}" ]; then
> +	PTXDIST_VCS_VERSION="unknown"
> +    fi
> +
> +    export PTXDIST_VCS_VERSION
> +}
> +export -f ptxd_make_vcs_version
> +
> +ptxd_make_vcs_version

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

      parent reply	other threads:[~2021-04-09 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  8:36 [ptxdist] [PATCH v3 1/2] " Steffen Trumtrar
2021-04-01  8:36 ` [ptxdist] [PATCH v3 2/2] rules: barebox: support barebox buildsystem_version Steffen Trumtrar
2021-04-09 13:33   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-04-04 17:16 ` [ptxdist] [PATCH v3 1/2] ptxd_make_vcs_version: add script to determine vcs hash Roland Hieber
2021-04-07 14:43   ` Michael Olbrich
2021-04-08  5:58     ` Steffen Trumtrar
2021-04-09 13:33 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1lUrG9-005xws-1a@dude03.red.stw.pengutronix.de \
    --to=mol@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=s.trumtrar@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox