From eebd6b0bb6cc1f724d8f78c1c419031004adc3e4 Mon Sep 17 00:00:00 2001 From: Mike Holmes Date: Fri, 21 Oct 2016 14:40:17 -0400 Subject: configure: the version cannot use a script Use of a script in the autotools breaks github CI Define the API version in configure and reuse it in the code Benefits: removes dependence on scripts to build removes scripts and the make file from odp/scripts removes generated .scmversion file places api versioning right next to lib versioning in the configure.ac allows github to auto build odp repos Signed-off-by: Mike Holmes Reviewed-by: Brian Brooks Signed-off-by: Maxim Uvarov --- scripts/Makefile.am | 1 - scripts/get_impl_str.sh | 11 ----------- scripts/git_hash.sh | 29 ----------------------------- 3 files changed, 41 deletions(-) delete mode 100644 scripts/Makefile.am delete mode 100755 scripts/get_impl_str.sh delete mode 100755 scripts/git_hash.sh (limited to 'scripts') diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 189b3efc2..000000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = get_impl_str.sh git_hash.sh diff --git a/scripts/get_impl_str.sh b/scripts/get_impl_str.sh deleted file mode 100755 index d765a531e..000000000 --- a/scripts/get_impl_str.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ -z ${1} ]; then - echo "should be called with a path" - exit -fi -ROOTDIR=${1} - -CUSTOM_STR=${CUSTOM_STR:-https://git.linaro.org/lng/odp.git} - -echo -n "'${CUSTOM_STR}' ($(cat ${ROOTDIR}/.scmversion))" diff --git a/scripts/git_hash.sh b/scripts/git_hash.sh deleted file mode 100755 index 336eb01dd..000000000 --- a/scripts/git_hash.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -if [ -z ${1} ]; then - echo "should be called with a path" - exit -fi -ROOTDIR=${1} - -if [ -d ${ROOTDIR}/.git ]; then - hash=$(git --git-dir=${ROOTDIR}/.git describe --match 'v[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*'\ - | tr -d "\n") - if [[ $(git --git-dir=${ROOTDIR}/.git diff --shortstat 2> /dev/null \ - | tail -n1) != "" ]]; then - dirty=.dirty - fi - - echo -n "${hash}${dirty}">${ROOTDIR}/.scmversion - - sed -i "s|-|.git|" ${ROOTDIR}/.scmversion - sed -i "s|-|.|g" ${ROOTDIR}/.scmversion - sed -i "s|^v||g" ${ROOTDIR}/.scmversion -elif [ ! -d ${ROOTDIR}/.git -a ! -f ${ROOTDIR}/.scmversion ]; then - echo -n "File ROOTDIR/.scmversion not found, " - echo "and not inside a git repository" - echo "Bailing out! Not recoverable!" - exit 1 -fi - -cat ${ROOTDIR}/.scmversion -- cgit v1.2.3