Skip to content

Commit

Permalink
[SVLS-4918] use variables for node versions for future autoupdates
Browse files Browse the repository at this point in the history
  • Loading branch information
apiarian-datadog committed Jul 15, 2024
1 parent 7735156 commit cc5471a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions datadog_wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,17 @@ setUpNodeEnv() {
echo "Setting up Datadog tracing for Node"
echo "Installing Node tracer"

if [ -z "${DD_NODE_TRACER_VERSION_4}" ]; then
DD_NODE_TRACER_VERSION_4=4.38.1
fi
if [ -z "${DD_NODE_TRACER_VERSION_5}" ]; then
DD_NODE_TRACER_VERSION_5=5.18.0
fi

if [[ "$NODE_RUNTIME_VERSION" =~ ^v16.* ]]; then
yarn add "dd-trace@4.38.1" || return
yarn add "dd-trace@$DD_NODE_TRACER_VERSION_4" || return
else
yarn add "dd-trace@5.18.0" || return
yarn add "dd-trace@$DD_NODE_TRACER_VERSION_5" || return
fi

ORIG_NODE_OPTIONS=$NODE_OPTIONS
Expand Down

0 comments on commit cc5471a

Please sign in to comment.