Resolve the problem : When updating the kubevela.io website , the version field in config file do not match. (#1587)

* fix webversion

* fix webversion

Co-authored-by: kubevela-bot <kubevela.bot@aliyun.com>
This commit is contained in:
wangyuan249
2021-04-30 16:13:59 +08:00
committed by GitHub
parent 0571ae3a54
commit e1dfe40794

View File

@@ -55,6 +55,7 @@ then
version=${major}.${minor}
echo "updating website for version $version"
sed -i.bak "s#lastVersion: 'v${version}'#lastVersion: 'current'#g" docusaurus.config.js
if grep -q $version versions.json; then
rm -r versioned_docs/version-${version}/
@@ -73,6 +74,7 @@ then
fi
yarn run docusaurus docs:version $version
sed -i.bak "s#lastVersion: 'current'#lastVersion: '${version}'#g" docusaurus.config.js
fi
# Check for release branch update only
@@ -83,6 +85,7 @@ then
# release-x.y -> vx.y
version=$(echo $VERSION|sed -e 's/\/*.*\/*-/v/g')
echo "updating website for version $version"
sed -i.bak "s#lastVersion: 'v${version}'#lastVersion: 'current'#g" docusaurus.config.js
if grep -q $version versions.json; then
rm -r versioned_docs/version-${version}/
@@ -101,6 +104,7 @@ then
fi
yarn run docusaurus docs:version $version
sed -i.bak "s#lastVersion: 'current'#lastVersion: '${version}'#g" docusaurus.config.js
fi