Skip to content

Commit

Permalink
fix: Revert changes that were being tested
Browse files Browse the repository at this point in the history
  • Loading branch information
ksentak committed Jul 1, 2024
1 parent 7187fa2 commit ad20db1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions languages/cpp/templates/codeblocks/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

ProviderInvokeSession(methodName, jsonParameters, err);
}
static void ProviderResultSession(std::string methodName, std::string& correlationId, ${provider.xresponse.name} result, Firebolt::Error *err = nullptr)
static void ProviderResultSession(std::string methodName, std::string& correlationId, ${provider.xresponse.name} result, Firebolt::Error *err = nullptr)
{
JsonObject jsonParameters;
WPEFramework::Core::JSON::Variant CorrelationId(correlationId);
Expand All @@ -34,7 +34,7 @@
${provider.xresponse.serialization}
ProviderInvokeSession(methodName, jsonParameters, err);
}
static void ProviderErrorSession(std::string methodName, std::string& correlationId, ${provider.xerror.name} result, Firebolt::Error *err = nullptr)
static void ProviderErrorSession(std::string methodName, std::string& correlationId, ${provider.xerror.name} result, Firebolt::Error *err = nullptr)
{
JsonObject jsonParameters;
WPEFramework::Core::JSON::Variant CorrelationId(correlationId);
Expand Down
20 changes: 19 additions & 1 deletion languages/cpp/templates/sdk/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,25 @@ do
esac
done

Version="TEST"
GetVersion()
{
PackagePath=${SdkPath}/../../../../../../package-lock.json
InputKey="\"@firebolt-js/openrpc\":"
Line=$(grep -n "${InputKey}" ${PackagePath})
if [[ "${Line}" == *"file:"* ]]; then
InputKey="name\": \"@firebolt-js/openrpc"
Line=$(grep -n "${InputKey}" ${PackagePath})
LineNo="$(echo ${Line} | head -n 1 | cut -d: -f1)"
VersionLine=$((LineNo++))
else
LineNo="$(echo ${Line} | head -n 1 | cut -d: -f1)"
fi
eval "array=(`sed -n "${LineNo}p" < ${PackagePath} | sed 's/\"/\n/g'`)"
Version=${array[2]}
}

Version=0.0
GetVersion
ReleaseName=firebolt-${ModuleName}-native-sdk-${Version}
ReleasePath=${InstallPath}/${ReleaseName}

Expand Down

0 comments on commit ad20db1

Please sign in to comment.