summaryrefslogtreecommitdiffstats
path: root/scripts/build-version
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build-version')
-rwxr-xr-xscripts/build-version10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/build-version b/scripts/build-version
new file mode 100755
index 000000000000..537d45815083
--- /dev/null
+++ b/scripts/build-version
@@ -0,0 +1,10 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-only
+
+prev_ver=$(cat .version 2>/dev/null) &&
+ver=$(expr ${prev_ver} + 1 2>/dev/null) ||
+ver=1
+
+echo ${ver} > .version
+
+echo ${ver}