From 233b537028bba8c9118421d013f2c846aced8eb0 Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Sat, 5 Mar 2022 01:40:45 +0800 Subject: [PATCH] build script. --- build.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 000000000..56ddee70 --- /dev/null +++ b/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +# Requires: Ruby, node, python + +tput setaf 2; echo "Installing markdown lint"; tput setaf 0 +gem install mdl + +tput setaf 2; echo "Generating new readme and mkdocs"; tput setaf 0 +node ./.github/readme-generate.js + +tput setaf 2; echo "Running markdown lint to check issues."; tput setaf 0 +mdl . -r ~MD036,~MD024,~MD004,~MD029 + +tput setaf 2; echo "Installing python requirements..."; tput setaf 0 +pip install -r requirements.txt + +tput setaf 2; echo "Builidng mkdocs and checking links..."; tput setaf 0 +mkdocs build --strict + +tput setaf 2; echo "Installing textlint"; tput setaf 0 +npm install + +tput setaf 2; echo "Running textlint..."; tput setaf 0 +./node_modules/.bin/textlint . --fix \ No newline at end of file