From: Luis R. Rodriguez Date: Thu, 17 May 2012 03:17:45 +0000 (-0700) Subject: compat-wireless: add support for COMPAT_BASE version prinout X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f7a33650e6edee6fe269d89a83c8948625b79aba;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: add support for COMPAT_BASE version prinout The COMPAT_BASE prints out the tag from where we pulled compat.git code from. This is useful when debugging code and verifying what version of compat was used. Signed-off-by: Luis R. Rodriguez --- diff --git a/.gitignore b/.gitignore index 881d0b4c3919..fbda6ffe4896 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ Module.symvers module.order .pc code-metrics.txt +.compat_base .compat_base_tree .compat_base_tree_version .compat_version diff --git a/Makefile b/Makefile index 11602dc37091..969325543ef3 100644 --- a/Makefile +++ b/Makefile @@ -70,6 +70,7 @@ $(error "The path to this compat-wireless directory has spaces in it." \ endif export CFLAGS += \ + -DCOMPAT_BASE="\"$(shell cat $(PWD)/.compat_base)\"" \ -DCOMPAT_BASE_TREE="\"$(shell cat $(PWD)/.compat_base_tree)\"" \ -DCOMPAT_BASE_TREE_VERSION="\"$(shell cat $(PWD)/.compat_base_tree_version)\"" \ -DCOMPAT_PROJECT="\"Compat-wireless\"" \ diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index 7e095b42b1b4..4e0445f49877 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -597,6 +597,11 @@ GIT_REMOTE=$(git config branch.${GIT_BRANCH}.remote) GIT_REMOTE=${GIT_REMOTE:-origin} GIT_REMOTE_URL=$(git config remote.${GIT_REMOTE}.url) GIT_REMOTE_URL=${GIT_REMOTE_URL:-unknown} + +cd $GIT_COMPAT_TREE +git describe > $DIR/.compat_base +cd $DIR + echo -e "${GREEN}Updated${NORMAL} from local tree: ${BLUE}${GIT_TREE}${NORMAL}" echo -e "Origin remote URL: ${CYAN}${GIT_REMOTE_URL}${NORMAL}" cd $DIR @@ -633,10 +638,12 @@ if [ -d ./.git ]; then cd $DIR echo -e "\nBase tree: ${GREEN}$(cat .compat_base_tree)${NORMAL}" >> $CODE_METRICS echo -e "Base tree version: ${PURPLE}$(cat .compat_base_tree_version)${NORMAL}" >> $CODE_METRICS + echo -e "compat.git: ${CYAN}$(cat .compat_base)${NORMAL}" >> $CODE_METRICS echo -e "compat-wireless release: ${YELLOW}$(cat .compat_version)${NORMAL}" >> $CODE_METRICS fi + echo -e "Code metrics archive: ${GREEN}http://bit.ly/H6BTF7${NORMAL}" >> $CODE_METRICS cat $CODE_METRICS