2010-01-09 10:19:43 +00:00
|
|
|
#!/bin/sh
|
2014-09-04 19:23:00 +00:00
|
|
|
DIR=`dirname $0`
|
2016-02-19 09:33:52 +00:00
|
|
|
FILE=$DIR/../platform/daemon/src/btstack_version.h
|
2015-05-02 21:05:29 +00:00
|
|
|
COMMIT=`git log -1 --pretty=format:%h`
|
2018-08-22 12:42:14 +00:00
|
|
|
MAJOR=1
|
|
|
|
MINOR=0
|
2010-01-09 10:19:43 +00:00
|
|
|
DATE=`date "+%Y-%m-%d_%H:%M:%S"`
|
2016-01-20 15:11:27 +00:00
|
|
|
printf "// BTstack - btstack_version.h\n" > $FILE
|
2010-01-09 10:19:43 +00:00
|
|
|
printf "// - generated by %s\n" $0>> $FILE
|
|
|
|
printf "// - at %s\n" $DATE >> $FILE
|
|
|
|
printf "#define BTSTACK_MAJOR %u\n" $MAJOR >> $FILE
|
|
|
|
printf "#define BTSTACK_MINOR %u\n" $MINOR >> $FILE
|
2015-05-02 21:05:29 +00:00
|
|
|
printf "#define BTSTACK_COMMIT \"%s\"\n" $COMMIT >> $FILE
|
|
|
|
printf "#define BTSTACK_VERSION \"%u.%u-%s\"\n" $MAJOR $MINOR $COMMIT >> $FILE
|
2015-05-13 07:32:49 +00:00
|
|
|
printf "#define BTSTACK_DATE \"%s\"\n" $DATE >> $FILE
|