mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-05 00:47:08 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user