Skip to content

Commit

Permalink
ci: experiment with manually runnable ci with pre-set branchnames
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Sep 26, 2024
1 parent 8641f16 commit 0cbf528
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 13 deletions.
17 changes: 13 additions & 4 deletions .circleci/authReact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ while IFS='"' read -ra ADDR; do
done
done <<< "$version"

coreDriverVersion=`echo $coreDriverArray | jq ". | last"`
coreDriverVersion=`echo $coreDriverVersion | tr -d '"'`
coreFree="null"
if [ -f cdi-core-map.json ]
then
coreFree=$coreDriverVersion
else
cat cdi-core-map.json
echo "coreDriverVersion: $coreDriverVersion"

coreBranchName=`cat cdi-core-map.json | jq -r '.["'$coreDriverVersion'"]'`
if [ "$coreBranchName" != "null" ]
then
coreFree=$coreBranchName
fi
fi

if [ "$coreFree" == "null" ]
then
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&driverName=node" \
-H 'api-version: 1'`
Expand Down
17 changes: 14 additions & 3 deletions .circleci/doBackendSDKTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@ fi
coreDriverVersion=$1
coreDriverVersion=`echo $coreDriverVersion | tr -d '"'`

frontendDriverVersion=$2
frontendDriverVersion=`echo $2 | tr -d '"'`

coreFree="null"
if [ -f cdi-core-map.json ]
then
coreFree=$coreDriverVersion
else
cat cdi-core-map.json
echo "coreDriverVersion: $coreDriverVersion"

coreBranchName=`cat cdi-core-map.json | jq -r '.["'$coreDriverVersion'"]'`
if [ "$coreBranchName" != "null" ]
then
coreFree=$coreBranchName
fi
fi

if [ "$coreFree" == "null" ]
then
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&driverName=node" \
-H 'api-version: 1'`
Expand Down
6 changes: 5 additions & 1 deletion .circleci/doUnitTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ then
cat cdi-core-map.json
echo "coreDriverVersion: $coreDriverVersion"

coreFree=`cat cdi-core-map.json | jq -r '.["'$coreDriverVersion'"]'`
coreBranchName=`cat cdi-core-map.json | jq -r '.["'$coreDriverVersion'"]'`
if [ "$coreBranchName" != "null" ]
then
coreFree=$coreBranchName
fi
fi

if [ "$coreFree" == "null" ]
Expand Down
2 changes: 1 addition & 1 deletion .circleci/setupAndTestWithFreeCore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ then
coreTag=$(echo $coreInfo | jq .tag | tr -d '"')
coreVersion=$(echo $coreInfo | jq .version | tr -d '"')
fi

exit 0;
if [ -f "cdi-plugin-interface-map.json" ]
then
pluginInterfaceTag=`cat cdi-plugin-interface-map.json | jq '.["'$coreVersionXYParam'"]' | tr -d '"'`
Expand Down
18 changes: 14 additions & 4 deletions .circleci/website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ while IFS='"' read -ra ADDR; do
done
done <<< "$version"

coreDriverVersion=`echo $coreDriverArray | jq ". | last"`
coreDriverVersion=`echo $coreDriverVersion | tr -d '"'`
coreFree="null"
if [ -f cdi-core-map.json ]
then
coreFree=$coreDriverVersion
else
cat cdi-core-map.json
echo "coreDriverVersion: $coreDriverVersion"

coreBranchName=`cat cdi-core-map.json | jq -r '.["'$coreDriverVersion'"]'`
if [ "$coreBranchName" != "null" ]
then
coreFree=$coreBranchName
fi
fi

if [ "$coreFree" == "null" ]
then
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&driverName=node" \
-H 'api-version: 1'`
Expand All @@ -38,6 +47,7 @@ else
coreFree=$(echo $coreFree | jq .core | tr -d '"')
fi


frontendDriverVersion=$1
frontendDriverVersion=`echo $frontendDriverVersion | tr -d '"'`

Expand Down

0 comments on commit 0cbf528

Please sign in to comment.