mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-28 15:20:39 +00:00
16 lines
625 B
Bash
Executable File
16 lines
625 B
Bash
Executable File
#!/bin/sh
|
|
DIR=`dirname $0`
|
|
FILE=$DIR/../platform/daemon/src/btstack_version.h
|
|
COMMIT=`git log -1 --pretty=format:%h`
|
|
MAJOR=1
|
|
MINOR=0
|
|
DATE=`date "+%Y-%m-%d_%H:%M:%S"`
|
|
printf "// BTstack - btstack_version.h\n" > $FILE
|
|
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
|
|
printf "#define BTSTACK_COMMIT \"%s\"\n" $COMMIT >> $FILE
|
|
printf "#define BTSTACK_VERSION \"%u.%u-%s\"\n" $MAJOR $MINOR $COMMIT >> $FILE
|
|
printf "#define BTSTACK_DATE \"%s\"\n" $DATE >> $FILE
|