From c2815ea10b17001d95d8cafc22be24b8fb504638 Mon Sep 17 00:00:00 2001 From: Bhumil Date: Mon, 11 Dec 2023 13:49:37 +0530 Subject: [PATCH] ci/cd changes to fetch latest dependency core/driver/frontend --- .circleci/authReact.sh | 16 ++++++++-------- .circleci/doUnitTests.sh | 4 ++-- .circleci/website.sh | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.circleci/authReact.sh b/.circleci/authReact.sh index 0ee6d4300..22fe942e4 100755 --- a/.circleci/authReact.sh +++ b/.circleci/authReact.sh @@ -26,8 +26,8 @@ i=0 coreDriverVersion=`echo $coreDriverArray | jq ". | last"` coreDriverVersion=`echo $coreDriverVersion | tr -d '"'` coreFree=`curl -s -X GET \ -"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion" \ --H 'api-version: 0'` +"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion&driverName=node" \ +-H 'api-version: 1'` if [[ `echo $coreFree | jq .core` == "null" ]] then echo "fetching latest X.Y version for core given core-driver-interface X.Y version: $coreDriverVersion, planType: FREE gave response: $coreFree. Please make sure all relevant cores have been pushed." @@ -44,8 +44,8 @@ while [ $i -lt $frontendDriverLength ]; do fi frontendVersionXY=`curl -s -X GET \ - "https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=website&mode=DEV&version=$frontendDriverVersion" \ - -H 'api-version: 0'` + "https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=website&mode=DEV&version=$frontendDriverVersion&driverName=node" \ + -H 'api-version: 1'` if [[ `echo $frontendVersionXY | jq .frontend` == "null" ]] then echo "fetching latest X.Y version for frontend given frontend-driver-interface X.Y version: $frontendDriverVersion, name: website gave response: $frontend. Please make sure all relevant versions have been pushed." @@ -65,8 +65,8 @@ while [ $i -lt $frontendDriverLength ]; do frontendVersion=$(echo $frontendInfo | jq .version | tr -d '"') nodeVersionXY=`curl -s -X GET \ - "https://api.supertokens.io/0/frontend-driver-interface/dependency/driver/latest?password=$SUPERTOKENS_API_KEY&mode=DEV&version=$frontendDriverVersion&driverName=node" \ - -H 'api-version: 0'` + "https://api.supertokens.io/0/frontend-driver-interface/dependency/driver/latest?password=$SUPERTOKENS_API_KEY&mode=DEV&version=$frontendDriverVersion&driverName=node&frontendName=auth-react" \ + -H 'api-version: 1'` if [[ `echo $nodeVersionXY | jq .driver` == "null" ]] then echo "fetching latest X.Y version for driver given frontend-driver-interface X.Y version: $frontendDriverVersion gave response: $nodeVersionXY. Please make sure all relevant drivers have been pushed." @@ -87,8 +87,8 @@ while [ $i -lt $frontendDriverLength ]; do someFrontendTestsRan=true frontendAuthReactVersionXY=`curl -s -X GET \ - "https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=auth-react&mode=DEV&version=$frontendDriverVersion" \ - -H 'api-version: 0'` + "https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=auth-react&mode=DEV&version=$frontendDriverVersion&driver=website" \ + -H 'api-version: 1'` if [[ `echo $frontendAuthReactVersionXY | jq .frontend` == "null" ]] then echo "fetching latest X.Y version for frontend given frontend-driver-interface X.Y version: $frontendDriverVersion, name: auth-react gave response: $frontend. Please make sure all relevant frontend libs have been pushed." diff --git a/.circleci/doUnitTests.sh b/.circleci/doUnitTests.sh index 783c13778..e880670e1 100755 --- a/.circleci/doUnitTests.sh +++ b/.circleci/doUnitTests.sh @@ -9,8 +9,8 @@ coreDriverVersion=$1 coreDriverVersion=`echo $coreDriverVersion | tr -d '"'` coreFree=`curl -s -X GET \ -"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion" \ --H 'api-version: 0'` +"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion&driverName=node" \ +-H 'api-version: 1'` if [[ `echo $coreFree | jq .core` == "null" ]] then echo "fetching latest X.Y version for core given core-driver-interface X.Y version: $coreDriverVersion, planType: FREE gave response: $coreFree. Please make sure all relevant cores have been pushed." diff --git a/.circleci/website.sh b/.circleci/website.sh index 62f7da4e3..90b7ebc24 100755 --- a/.circleci/website.sh +++ b/.circleci/website.sh @@ -26,8 +26,8 @@ i=0 coreDriverVersion=`echo $coreDriverArray | jq ". | last"` coreDriverVersion=`echo $coreDriverVersion | tr -d '"'` coreFree=`curl -s -X GET \ -"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion" \ --H 'api-version: 0'` +"https://api.supertokens.io/0/core-driver-interface/dependency/core/latest?password=$SUPERTOKENS_API_KEY&planType=FREE&mode=DEV&version=$coreDriverVersion&driverName=node" \ +-H 'api-version: 1'` if [[ `echo $coreFree | jq .core` == "null" ]] then echo "fetching latest X.Y version for core given core-driver-interface X.Y version: $coreDriverVersion, planType: FREE gave response: $coreFree. Please make sure all relevant cores have been pushed." @@ -44,8 +44,8 @@ while [ $i -lt $frontendDriverLength ]; do fi frontendVersionXY=`curl -s -X GET \ - "https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=website&mode=DEV&version=$frontendDriverVersion" \ - -H 'api-version: 0'` + "https://api.supertokens.io/0/frontend-driver-interface/dependency/frontend/latest?password=$SUPERTOKENS_API_KEY&frontendName=website&mode=DEV&version=$frontendDriverVersion&driverName=node" \ + -H 'api-version: 1'` if [[ `echo $frontendVersionXY | jq .frontend` == "null" ]] then echo "fetching latest X.Y version for frontend given frontend-driver-interface X.Y version: $frontendDriverVersion, name: website gave response: $frontend. Please make sure all relevant versions have been pushed." @@ -65,8 +65,8 @@ while [ $i -lt $frontendDriverLength ]; do frontendVersion=$(echo $frontendInfo | jq .version | tr -d '"') nodeVersionXY=`curl -s -X GET \ - "https://api.supertokens.io/0/frontend-driver-interface/dependency/driver/latest?password=$SUPERTOKENS_API_KEY&mode=DEV&version=$frontendDriverVersion&driverName=node" \ - -H 'api-version: 0'` + "https://api.supertokens.io/0/frontend-driver-interface/dependency/driver/latest?password=$SUPERTOKENS_API_KEY&mode=DEV&version=$frontendDriverVersion&driverName=node&frontendName=website" \ + -H 'api-version: 1'` if [[ `echo $nodeVersionXY | jq .driver` == "null" ]] then echo "fetching latest X.Y version for driver given frontend-driver-interface X.Y version: $frontendDriverVersion gave response: $nodeVersionXY. Please make sure all relevant drivers have been pushed."