Skip to content

Commit

Permalink
clear more caches
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Sep 16, 2024
1 parent 8fe9e93 commit 6f1652b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/website/tools/preprocess_docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ if (process.argv.includes("--watch")) {
if (Date.now() - lastUpdate < 500) {
return;
}
fs.rmdirSync(MD_TARGET_DIR, {force: true, recursive: true})
fs.rmSync(MD_TARGET_DIR, {force: true, recursive: true})
console.log('%s changed...', name);
syncExamples();
preprocess_docs();
Expand Down
8 changes: 6 additions & 2 deletions docs/website/tools/update_versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const semver = require('semver')
// const
const REPO_DIR = ".dlt-repo"
const REPO_DOCS_DIR = REPO_DIR + "/docs/website"
const REPO_PREPROCESSED_FILES_DIR = REPO_DOCS_DIR + "/docs_processed"
const REPO_URL = "https://github.com/dlt-hub/dlt.git"
const VERSIONED_DOCS_FOLDER = "versioned_docs"
const VERSIONED_SIDEBARS_FOLDER = "versioned_sidebars"
Expand All @@ -19,6 +20,7 @@ fs.rmSync(REPO_DIR, { recursive: true, force: true })

// checkout fresh
console.log("Checking out dlt repo")
fs.rmSync(REPO_DIR, {force: true, recursive: true})
proc.execSync(`git clone ${REPO_URL} ${REPO_DIR}`)

// find tags
Expand Down Expand Up @@ -91,6 +93,9 @@ for (const version of selectedVersions) {
// process.exit(1)
// }

// clear preprocessed docs in subrepo
fs.rmSync(REPO_PREPROCESSED_FILES_DIR, { force: true, recursive: true})

// build doc version, we also run preprocessing and markdown gen for each doc version
console.log(`Building docs...`)
proc.execSync(`cd ${REPO_DOCS_DIR} && npm run preprocess-docs && PYTHONPATH=. pydoc-markdown`)
Expand All @@ -100,8 +105,7 @@ for (const version of selectedVersions) {

console.log(`Moving snapshot`)
fs.cpSync(REPO_DOCS_DIR+"/"+VERSIONED_DOCS_FOLDER, VERSIONED_DOCS_FOLDER, {recursive: true})
fs.cpSync(REPO_DOCS_DIR+"/"+VERSIONED_SIDEBARS_FOLDER, VERSIONED_SIDEBARS_FOLDER, {recursive: true})

fs.cpSync(REPO_DOCS_DIR+"/"+VERSIONED_SIDEBARS_FOLDER, VERSIONED_SIDEBARS_FOLDER, {recursive: true})
}

fs.cpSync(REPO_DOCS_DIR+"/versions.json", "versions.json")

0 comments on commit 6f1652b

Please sign in to comment.