From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: In-Reply-To: <20210401083641.9251-1-s.trumtrar@pengutronix.de> MIME-Version: 1.0 Message-Id: From: Michael Olbrich Date: Fri, 09 Apr 2021 15:33:17 +0200 Subject: Re: [ptxdist] [APPLIED] ptxd_make_vcs_version: add script to determine vcs hash List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Steffen Trumtrar Thanks, applied as 669c4e26a1ccaeff28b0d21dbf9c079560d85fef. Michael [sent from post-receive hook] On Fri, 09 Apr 2021 15:33:17 +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 > Message-Id: <20210401083641.9251-1-s.trumtrar@pengutronix.de> > [mol: drop unnecessary 'echo'] > Signed-off-by: Michael Olbrich > > 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 > +# > +# 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