-
Notifications
You must be signed in to change notification settings - Fork 16
/
version.sh
executable file
·39 lines (34 loc) · 1 KB
/
version.sh
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
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Copyright 2017-2021, Silicon Laboratories, Inc.
SRC_DIR=$1
VERSION_FILE=$2
GIT_LABEL="$(git -C $SRC_DIR describe --tags --dirty --match "*v[0-9]*" || echo '<unknown version>')"
cat << EOF > $VERSION_FILE.tmp
/* SPDX-License-Identifier: GPL-2.0 */
/* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT! */
#include <stdint.h>
#include "common/version.h"
/*
* wsbrd API versions:
*
* 2.0.0
* - Complete API change
* 0.2.0
* - Pop the retry_per_rate array and the successful phy mode id
* in SPINEL_CMD_PROP_IS/SPINEL_PROP_STREAM_STATUS that were
* used to send the data, necessary for mode switch fallback
* 0.1.0
* - Pop ACK request, frame pending, and PAN ID suppression in
* PROP_IS/STREAM_RAW, for MAC frame reconstruction
*/
const char *version_daemon_str = "${GIT_LABEL}";
uint32_t version_daemon_api = VERSION(2, 0, 0);
EOF
if cmp -s $VERSION_FILE $VERSION_FILE.tmp
then
rm -f $VERSION_FILE.tmp
else
mv -f $VERSION_FILE.tmp $VERSION_FILE
fi