Skip to content

Commit

Permalink
chore: update the SDK_VERSION number in the sidebar file when a relea…
Browse files Browse the repository at this point in the history
…se is cut (#2156)
  • Loading branch information
proletesseract authored Sep 10, 2024
1 parent aa70955 commit eb8cae4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/scripts/update-docs-link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ fi
sed -i -E "s/SDK_VERSION = '.*'/SDK_VERSION = '$VERSION'/g;" $FILE
fi

FILE2=sidebars/sidebars-docs.js
if [ "$(uname)" == "Darwin" ]; then
# On Mac OS, sed requires an empty string as an argument to -i to avoid creating a backup file
sed -i '' -E "s/SDK_VERSION = '.*'/SDK_VERSION = '$VERSION'/g;" $FILE2
else
sed -i -E "s/SDK_VERSION = '.*'/SDK_VERSION = '$VERSION'/g;" $FILE2
fi


major=$(echo $VERSION | awk '{
split($0, a, ".");
print a[1];
Expand Down

0 comments on commit eb8cae4

Please sign in to comment.