mirror of
https://github.com/bluekitchen/btstack.git
synced 2024-12-29 09:26:08 +00:00
arduino: use git tag/revision for archive
This commit is contained in:
parent
690999b0e5
commit
c7747faaec
@ -4,9 +4,7 @@
|
||||
|
||||
DIR=.
|
||||
BTSTACK_ROOT=${realpath ../..}
|
||||
DUMMY=$(shell )
|
||||
VERSION=`sed -n -e 's/^.*BTSTACK_VERSION \"\(.*\)\"/\1/p' ${BTSTACK_ROOT}/platform/daemon/src/btstack_version.h`
|
||||
BTSTACK_PACKAGE=/tmp/btstack
|
||||
VERSION=$(shell ${BTSTACK_ROOT}/tool/get_git_version.sh)
|
||||
ARCHIVE=$(BTSTACK_ROOT)/btstack-arduino-${VERSION}.zip
|
||||
|
||||
SRC_C_FILES = btstack_memory.c btstack_linked_list.c btstack_memory_pool.c btstack_run_loop.c btstack_crypto.c
|
||||
@ -30,9 +28,6 @@ ARDUINO_LIBS=~/Documents/arduino/libraries/BTstack
|
||||
|
||||
all: release
|
||||
|
||||
clean:
|
||||
rm -rf ${BTSTACK_PACKAGE}
|
||||
|
||||
update_version:
|
||||
${BTSTACK_ROOT}/tool/get_version.sh
|
||||
|
||||
|
17
tool/get_git_version.sh
Executable file
17
tool/get_git_version.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# get tag from git
|
||||
tag=`git tag --points-at HEAD`
|
||||
|
||||
# get git version
|
||||
commit=`git rev-parse --short HEAD`
|
||||
|
||||
# use tag if available
|
||||
if [ -z "$tag" ]
|
||||
then
|
||||
version=${commit}
|
||||
else
|
||||
version=${tag}-${commit}
|
||||
fi
|
||||
|
||||
echo "${version}"
|
Loading…
Reference in New Issue
Block a user