Skip to content

Commit

Permalink
Remove -i from sed command due to compatibility bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
DarcyRaynerDD committed Oct 21, 2020
1 parent 915fd9c commit 4e4f12c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/update_dist_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ set -e
echo "Updating version constants"
DATADOG_LAMBDA_VERSION=$(cat package.json | jq -r ".version")
DD_TRACE_VERSION=$(sed -n -E "s/dd-trace@([0-9]*.[0-9]*.[0-9]*):/\1/p" yarn.lock)
sed -i -E "s/(datadogLambdaVersion = )\"(X.X.X)\"/\1\""$DATADOG_LAMBDA_VERSION"\"/" ./dist/trace/constants.js
sed -i -E "s/(ddtraceVersion = )\"(X.X.X)\"/\1\""$DD_TRACE_VERSION"\"/" ./dist/trace/constants.js
echo "Lambda Version ${DATADOG_LAMBDA_VERSION}"
echo "Trace Version ${DD_TRACE_VERSION}"

cat ./dist/trace/constants.js |
sed -E "s/(datadogLambdaVersion = )\"(X.X.X)\"/\1\""$DATADOG_LAMBDA_VERSION"\"/" |
sed -E "s/(ddtraceVersion = )\"(X.X.X)\"/\1\""$DD_TRACE_VERSION"\"/" >> ./dist/trace/constants.js

0 comments on commit 4e4f12c

Please sign in to comment.