Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Mar 11, 2025

The update-release-branch.sh script was not updating .ts and .tsx files and was relying on an old repo structure. Let's make the script work with the new structure and then update links in the docs and examples, replacing outdated versions (e.g., 7.0-release, react-mapbox-gl) with the correct v8 links.

This fixes #2497.

The `update-release-branch.sh` script was not updating `.ts` and `.tsx`
files and was relying on an old repo structure. Let's make the script
work with the new structure and then update links in the docs and
examples, replacing outdated versions (e.g., `7.0-release`,
`react-mapbox-gl`) with the correct v8 links.
find docs -iname "*.md" -type f -exec sed -i '' -E "s/react-map-gl\/(tree|blob)\/(master|[0-9\.]+-release)/react-map-gl\/tree\/${BRANCH}/g" {} \;
find examples -maxdepth 0 -iname "*.md" -type f -exec sed -i '' -E "s/react-map-gl\/(tree|blob)\/(master|[0-9\.]+-release)/react-map-gl\/tree\/${BRANCH}/g" {} \;
find examples/*/src -iname "*.js" -type f -exec sed -i '' -E "s/react-map-gl\/(tree|blob)\/(master|[0-9\.]+-release)/react-map-gl\/tree\/${BRANCH}/g" {} \;
find docs -mindepth 2 -iname "*.md" -exec perl -i -pe "s/react-map-gl\/(tree|blob)\/(master|[0-9\.]+-release)/react-map-gl\/tree\/${BRANCH}/g" {} \;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super confident in adding -mindepth 2 here. The reason that I added it is that there are a few markdown files under /docs (README.md, upgrade-guide.md, and whats-new.md) that seem to be manually maintained. I’d definitely appreciate any additional thoughts on this.

@Pessimistress
Copy link
Collaborator

Greatly appreciate your find! I guess the issue came from rearranging the docs directory from v7 to v8...

@Pessimistress Pessimistress merged commit 0a59df5 into visgl:master Mar 12, 2025
@ghost ghost deleted the fixup-links-in-examples-and-docs-for-v8 branch March 12, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] examples link to 7.0-release

2 participants