diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-06-20 16:49:19 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2024-07-08 17:52:31 +0100 |
commit | 644986c2b77eef28150f6ea2083f9b828c509d26#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Generate a version string using git describe
build_dir="$1"
src_dir="$2"
project_version="$3"
# If .tarball-version exists, output the version string from the file and exit.
# This file is auto-generated on a 'meson dist' command from the run-dist.sh
# script.
if [ -n "$src_dir" ] && [ -f "$src_dir"/.tarball-version ]
then
cat "$src_dir"/.tarball-version
exit 0
fi
# Bail out if the directory isn't under git control
git_dir=$(git rev-parse --git-dir 2>&1) || exit |