Skip to content

Commit d28856f

Browse files
committed
Upversion to bug fix release 3.3.0.1
no functional change from latest unstable Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
1 parent fae8b16 commit d28856f

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

openhantek/src/OH_BUILD.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Do not edit, will be re-created at each commit!
2-
#define OH_BUILD "20220615 - commit 1029"
2+
#define OH_BUILD "20220616 - commit 1030"

openhantek/src/OH_VERSION.h

+35-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// next line shall define either OH_VERSION or LAST_OH_VERSION
1111
//
12-
#define LAST_OH_VERSION "3.3.0"
12+
#define OH_VERSION "3.3.0.1"
1313

1414

1515
// do not edit below
@@ -25,6 +25,37 @@
2525
#endif
2626
#endif
2727

28+
/* content of ".git/hooks/pre-commit":
29+
30+
#!/bin/sh
31+
32+
# this script is automatically run before committing
33+
# it provides version info (shown in top line of the program)
34+
# inspired by: https://gist.github.com/sg-s/2ddd0fe91f6037ffb1bce28be0e74d4e
35+
36+
# this file will be updated automatically by every commit
37+
#
38+
OH_BUILD_H="$(git rev-parse --show-toplevel)"/openhantek/src/OH_BUILD.h
39+
40+
# commit date
41+
#
42+
DATE=$(date +%Y%m%d)
43+
44+
# number of this commit (i.e. number of previous commits + 1)
45+
#
46+
COMMIT=$(( $(git log main --pretty=oneline | wc -l) + 1 ))
47+
48+
# define a string with commit date and number of this commit
49+
#
50+
echo "// Do not edit, will be re-created at each commit!" > ${OH_BUILD_H}
51+
echo "#define OH_BUILD \"$DATE - commit $COMMIT\"" >> ${OH_BUILD_H}
52+
53+
# and finally stage the change
54+
#
55+
git add ${OH_BUILD_H}
56+
57+
*/
58+
2859
/* content of ".git/hooks/post-commit":
2960
3061
#!/bin/bash
@@ -33,14 +64,13 @@
3364
# it tags the commit if a version is defined in the version file
3465
# inspired by: https://coderwall.com/p/mk18zq/automatic-git-version-tagging-for-npm-modules
3566
36-
# this file was updated during development (by hand)
67+
# this file was updated during development (by script build/MK_NEW_VER)
3768
#
38-
OH_VERSION_H=openhantek/src/OH_VERSION.h
69+
OH_VERSION_H="$(git rev-parse --show-toplevel)"/openhantek/src/OH_VERSION.h
3970
4071
# check if the last commit changed the entry OH_VERSION in file ...OH_VERSION.h and extract the new version
4172
#
42-
OH_VERSION=$(git diff HEAD^..HEAD -- "$(git rev-parse --show-toplevel)"/${OH_VERSION_H}
43-
| awk '/^\+\#define OH_VERSION/ { print $3 }' | tr -d '"')
73+
OH_VERSION=$(git diff HEAD^..HEAD -- ${OH_VERSION_H} | awk '/^\+#define OH_VERSION/ { print $3 }' | tr -d '"')
4474
4575
# if commit was marked as OH_VERSION then tag it accordingly and change entry to LAST_OH_VERSION
4676
#

0 commit comments

Comments
 (0)