Skip to content

Commit

Permalink
fix(scripts): differentiate sed command by platform (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrem authored Jan 5, 2023
1 parent 0e11285 commit 10eb42f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/update_relayer_sdk_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ new_value="RELAYER_SDK_VERSION = \"$next_version\""
echo "[SCRIPT] Updating RELAYER_SDK_VERSION to $next_version in $file_location..."

# Use sed to update the value in the file
sed -i '' "s/${regex}/${new_value}/g" $file_location
if [ "$(uname)" = "Darwin" ]; then
# MacOS requires an empty string as the second argument to -i
sed -i "" "s/${regex}/${new_value}/g" $file_location
else
sed -i "s/${regex}/${new_value}/g" $file_location
fi


echo "[SCRIPT] ...Done!"

0 comments on commit 10eb42f

Please sign in to comment.