This is an automated email from the ASF dual-hosted git repository.
yuchaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-yunikorn-site.git
The following commit(s) were added to refs/heads/master by this push:
new e7aff00 [YUNIKORN-944] Fix build dependencies (#91)
e7aff00 is described below
commit e7aff000b9eb9f1752952c9f54a22830396993a4
Author: Wilfred Spiegelenburg <[email protected]>
AuthorDate: Tue Nov 16 17:21:15 2021 +1100
[YUNIKORN-944] Fix build dependencies (#91)
The search theme requires a later version of node.js to build.
Fix the local build script and the README to add the search dependency.
Update node to the current release 16.13.
Upgrade docusaurus to the latest v2 beta release (moving away from the
current alpha release)
---
Dockerfile | 4 ++--
README.md | 1 +
local-build.sh | 6 +++++-
package.json | 6 +++---
4 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 31de517..5483e81 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM node:12.18.0
+FROM node:16.13.0
ADD . /incubator-yunikorn-site
WORKDIR /incubator-yunikorn-site
@@ -21,4 +21,4 @@ WORKDIR /incubator-yunikorn-site
RUN yarn install
RUN yarn add @docusaurus/theme-search-algolia
RUN yarn build
-ENTRYPOINT yarn start --host 0.0.0.0
\ No newline at end of file
+ENTRYPOINT yarn start --host 0.0.0.0
diff --git a/README.md b/README.md
index af832c8..c18574a 100644
--- a/README.md
+++ b/README.md
@@ -56,6 +56,7 @@ Instead of running the build inside a docker image you can
also run it locally w
This is faster than running the build inside a docker image:
```shell script
yarn install
+yarn add @docusaurus/theme-search-algolia
yarn build
yarn run start
```
diff --git a/local-build.sh b/local-build.sh
index db11af6..a73d5c5 100755
--- a/local-build.sh
+++ b/local-build.sh
@@ -34,7 +34,7 @@ function clean() {
function build() {
# build local docker image
cat <<EOF >.dockerfile.tmp
-FROM node:12.18.0
+FROM node:16.13.0
ADD . /incubator-yunikorn-site
WORKDIR /incubator-yunikorn-site
EOF
@@ -58,6 +58,10 @@ function run() {
docker exec -it yunikorn-site-local /bin/bash -c "yarn install"
[ "$?" -ne 0 ] && echo "yarn install failed" && return 1
+ # install dependency in docker container
+ docker exec -it yunikorn-site-local /bin/bash -c "yarn add
@docusaurus/theme-search-algolia"
+ [ "$?" -ne 0 ] && echo "yarn add failed" && return 1
+
# run build inside the container
docker exec -it yunikorn-site-local /bin/bash -c "yarn build"
[ "$?" -ne 0 ] && echo "yarn build failed" && return 1
diff --git a/package.json b/package.json
index eaade6c..88f7133 100644
--- a/package.json
+++ b/package.json
@@ -10,9 +10,9 @@
"release": "docusaurus docs:version"
},
"dependencies": {
- "@docusaurus/core": "2.0.0-alpha.63",
- "@docusaurus/preset-classic": "2.0.0-alpha.63",
- "@docusaurus/theme-search-algolia": "^2.0.0-beta.3",
+ "@docusaurus/core": "2.0.0-beta.9",
+ "@docusaurus/preset-classic": "2.0.0-beta.9",
+ "@docusaurus/theme-search-algolia": "^2.0.0-beta.9",
"@mdx-js/react": "^1.5.8",
"clsx": "^1.1.1",
"react": "16.13.1",