From 949d0b6ec7681fce09756587629375ccf1f8b54a Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Fri, 2 Oct 2020 11:36:33 +0200 Subject: [PATCH] updating client api, tag updating script --- slsSupportLib/include/versionAPI.h | 6 +++--- updateAPIVersion.sh | 2 +- updateClientAPI.sh | 11 +++++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index f2a4be049..fffc5cfe8 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -1,8 +1,5 @@ /** API versions */ #define GITBRANCH "developer" -#define APILIB 0x200810 -#define APIRECEIVER 0x200810 -#define APIGUI 0x200804 #define APICTB 0x201002 #define APIGOTTHARD 0x200924 #define APIGOTTHARD2 0x201002 @@ -10,3 +7,6 @@ #define APIMYTHEN3 0x201002 #define APIMOENCH 0x201002 #define APIEIGER 0x201002 +#define APILIB 0x201002 +#define APIRECEIVER 0x201002 +#define APIGUI 0x201002 diff --git a/updateAPIVersion.sh b/updateAPIVersion.sh index da34f0e6b..b5aee0989 100755 --- a/updateAPIVersion.sh +++ b/updateAPIVersion.sh @@ -1,6 +1,6 @@ #require 2 arguments, API_NAME API_DIR (relative to package) if [ $# -lt 2 ]; then - echo "wrong usage of updateVersion.sh" + echo "Wrong usage of updateVersion.sh. Requires atleast 2 arguments [API_NAME, API_DIR]" exit -1 fi diff --git a/updateClientAPI.sh b/updateClientAPI.sh index 084f43b5f..defd49f03 100755 --- a/updateClientAPI.sh +++ b/updateClientAPI.sh @@ -13,12 +13,19 @@ do ./updateAPIVersion.sh ${arraynames[$i]} ${arraydirs[$i]} done +#use tag +if [ $# -eq 0 ]; then + declare -a TAG=$(git rev-parse --abbrev-ref HEAD) #find branch -CURR_BRANCH=$(git rev-parse --abbrev-ref HEAD) +else + declare -a TAG=${1} +fi +#CURR_BRANCH=$(git rev-parse --abbrev-ref HEAD) #update branch BRANCH=$(cat $API_FILE | grep GITBRANCH | awk '{print $3}' ) -sed -i s/$BRANCH/\"$CURR_BRANCH\"/g $API_FILE +#sed -i s/$BRANCH/\"$CURR_BRANCH\"/g $API_FILE +sed -i s/$BRANCH/\"$TAG\"/g $API_FILE