Summary:
`make new-website-version` would fail if run a second time, because it
assumes the version is brand new. Now, it will delete previous traces of
the new version, which allows one to easily update commits upgrading the
website instead of reverting the diff then running `make
new-website-version` again.
Reviewed By: martintrojer
Differential Revision: D24218463
fbshipit-source-id: 61f416677
master
Jules Villard4 years agocommitted byFacebook GitHub Bot
-exec sed -i -e 's#/next/#/$(INFER_MAJOR).$(INFER_MINOR).$(INFER_PATCH)/#g'\{\}\+
# adjust versions.md, the page where users can navigate to other versions of the docs
# adjust versions.md, the page where users can navigate to other versions of the docs, unless
# it was already changed by an earlier run of this rule
cd$(WEBSITE_DIR)/ &&\
grep -q -F 'latest released version ($(INFER_MAJOR).$(INFER_MINOR).$(INFER_PATCH))' docs/versions.md ||\
find docs versioned_docs -name versions.md \
-exec sed -i -e 's#^- \[latest released version (\([^)]*\))\](/docs/getting-started)$$#- [latest released version ($(INFER_MAJOR).$(INFER_MINOR).$(INFER_PATCH))](/docs/getting-started)\n- [previous version (\1)](/docs/\1/getting-started)#'\{\}\+