mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v2 1/2] ptxd_make_vcs_version: add script to determine vcs hash
Date: Thu, 01 Apr 2021 08:43:48 +0200	[thread overview]
Message-ID: <87v996bj2z.fsf@pengutronix.de> (raw)
In-Reply-To: <20210401054618.GI8755@pengutronix.de>


Michael Olbrich <m.olbrich@pengutronix.de> writes:

> On Thu, Apr 01, 2021 at 06:52:51AM +0200, Steffen Trumtrar 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>
>> ---
>> changes in v2:
>>     - use "--tags" in git describe
>>
>>  scripts/lib/ptxd_make_vcs_version.sh | 20 ++++++++++++++++++++
>>  1 file changed, 20 insertions(+)
>>  create mode 100644 scripts/lib/ptxd_make_vcs_version.sh
>>
>> diff --git a/scripts/lib/ptxd_make_vcs_version.sh b/scripts/lib/ptxd_make_vcs_version.sh
>> new file mode 100644
>> index 000000000000..07856db967b4
>> --- /dev/null
>> +++ b/scripts/lib/ptxd_make_vcs_version.sh
>> @@ -0,0 +1,20 @@
>> +#!/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="$(echo $(git describe 2>/dev/null || git describe --always --tags))"
>
> We should probably redirect stderr for the second git command as well.
>

Ok.

>> +
>> +    if [ -z "${PTXDIST_VCS_VERSION}" ]; then
>> +       PTXDIST_BUILD_VERSION_VCS="unknown"
>
> Wrong indention (on tab here). And this should be:
>
> 	PTXDIST_VCS_VERSION="unknown"
>
> right?
>

Right, of course.


Best regards,
Steffen

--
Pengutronix e.K.                | Dipl.-Inform. Steffen Trumtrar |
Steuerwalder Str. 21            | https://www.pengutronix.de/    |
31137 Hildesheim, Germany       | Phone: +49-5121-206917-0       |
Amtsgericht Hildesheim, HRA 2686| Fax:   +49-5121-206917-5555    |

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

      reply	other threads:[~2021-04-01  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  4:52 Steffen Trumtrar
2021-04-01  4:52 ` [ptxdist] [PATCH v2 2/2] rules: barebox: support barebox buildsystem_version Steffen Trumtrar
2021-04-01  5:46 ` [ptxdist] [PATCH v2 1/2] ptxd_make_vcs_version: add script to determine vcs hash Michael Olbrich
2021-04-01  6:43   ` Steffen Trumtrar [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=87v996bj2z.fsf@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=ptxdist@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