/.reuse/

di/libcamera.git/atom/utils/gen-version.sh?h=yaml-emitter' type='application/atom+xml'/>
summaryrefslogtreecommitdiff
path: root/utils/gen-version.sh
blob: e1f7ca7b6f01d050dd64a6d2c900a9f39c716d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/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