Thanks, applied as 669c4e26a1ccaeff28b0d21dbf9c079560d85fef.

Michael

[sent from post-receive hook]

On Fri, 09 Apr 2021 15:33:17 +0200, Steffen Trumtrar 
<[email protected]> 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 <[email protected]>
> Message-Id: <[email protected]>
> [mol: drop unnecessary 'echo']
> Signed-off-by: Michael Olbrich <[email protected]>
> 
> 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 <[email protected]>
> +#
> +# 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
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to