-
-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathsync-repositories.sh
More file actions
executable file
·35 lines (27 loc) · 1.01 KB
/
sync-repositories.sh
File metadata and controls
executable file
·35 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
MAIN_REPO_URL=https://github.com/sequelize/sequelize.git
ROOT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
DOCS_DIR="$ROOT_DIR/.sequelize"
API_DIR="$ROOT_DIR/static/api"
set -e
# Ensure API_DIR
mkdir -p "$API_DIR"
# ======================================
# Sequelize v7 (typedoc + docusaurus)
# Cloned to its own folder because the documentation can import some of its files at build time
# ======================================
# Clear generated directories
rm -rf "$DOCS_DIR/v7"
rm -rf "$API_DIR/v7"
# Get sources
git clone -b main --single-branch "$MAIN_REPO_URL" --depth 1 "$DOCS_DIR/v7"
pushd "$DOCS_DIR/v7"
yarn # Install branch deps & build
yarn build
yarn docs # Generate v7 typedocs
mv .typedoc-build "$API_DIR/v7" # Move compiled api reference
popd
# ======================================
# Sequelize v6 and lower
# The files are living inside the static directory and will just be copied over to the build directory at build time
# ======================================