Skip to content

Commit

Permalink
Update SDK docs link
Browse files Browse the repository at this point in the history
  • Loading branch information
carleeto committed Aug 11, 2023
1 parent 37abdb0 commit b3c3a41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/scripts/update-docs-link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ fi

FILE=_typescript.mdx

pushd $CLONE_DIR
if [[ "$OSTYPE" == "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/[0-9]\\.[0-9]\\.[0-9](.* class=\"ts-immutable-sdk-ref-link\")/$VERSION\1/g;" $FILE
else
sed -i -E "s/[0-9]\\.[0-9]\\.[0-9](.* class=\"ts-immutable-sdk-ref-link\")/$VERSION\1/g;" $FILE
fi
popd
(
cd $CLONE_DIR;
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/[0-9]\\.[0-9]\\.[0-9](.* class=\"ts-immutable-sdk-ref-link\")/$VERSION\1/g;" $FILE
else
sed -i -E "s/[0-9]\\.[0-9]\\.[0-9](.* class=\"ts-immutable-sdk-ref-link\")/$VERSION\1/g;" $FILE
fi
)
3 changes: 3 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- name: Build SDK Docs
run: yarn docs:build

- name: Update version link
run: ./.github/scripts/update-docs-link.sh

- name: Create SDK Docs PR
run: ./.github/scripts/push-docs-pr.sh
shell: bash

0 comments on commit b3c3a41

Please sign in to comment.