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