File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- BUILD_NUMBER =" 0"
4
- BUILD_COMMIT =" unknown"
3
+ build_number =" 0"
4
+ build_commit =" unknown"
5
5
6
6
# git is broken on WSL so we need to strip extra newlines
7
- REV_LIST=$( git rev-list --count HEAD | tr -d ' \n' )
8
- if [ $? -eq 0 ]; then
9
- BUILD_NUMBER=$REV_LIST
7
+ if out=$( git rev-list --count HEAD | tr -d ' \n' ) ; then
8
+ build_number=$out
10
9
fi
11
10
12
- REV_PARSE=$( git rev-parse --short HEAD | tr -d ' \n' )
13
- if [ $? -eq 0 ]; then
14
- BUILD_COMMIT=$REV_PARSE
11
+ if out=$( git rev-parse --short HEAD | tr -d ' \n' ) ; then
12
+ build_commit=$out
15
13
fi
16
14
17
15
echo " #ifndef BUILD_INFO_H"
18
16
echo " #define BUILD_INFO_H"
19
17
echo
20
- echo " #define BUILD_NUMBER $BUILD_NUMBER "
21
- echo " #define BUILD_COMMIT \" $BUILD_COMMIT \" "
18
+ echo " #define BUILD_NUMBER $build_number "
19
+ echo " #define BUILD_COMMIT \" $build_commit \" "
22
20
echo
23
21
echo " #endif // BUILD_INFO_H"
You can’t perform that action at this time.
0 commit comments