Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate scripts #14452

Merged
merged 4 commits into from Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/documentation.yml
Expand Up @@ -57,5 +57,18 @@ jobs:
node-version: 16

- run: npm install
- name: Setup MongoDB
run: |
wget -q https://downloads.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.14.tgz
tar xf mongodb-linux-x86_64-ubuntu2004-5.0.14.tgz
mkdir -p ./data/db/27017 ./data/db/27000
printf "\n--timeout 8000" >> ./test/mocha.opts
./mongodb-linux-x86_64-ubuntu2004-5.0.14/bin/mongod --setParameter ttlMonitorSleepSecs=1 --fork --dbpath ./data/db/27017 --syslog --port 27017
sleep 2
mongod --version
echo `pwd`/mongodb-linux-x86_64-ubuntu2004-5.0.14/bin >> $GITHUB_PATH
- name: Setup config
run: |
echo "module.exports = {uri:'mongodb://127.0.0.1:27017/mongoose_test'};" > ./.config.js
- run: npm run docs:clean
- run: npm run docs:generate
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -86,7 +86,6 @@
"docs:checkout:5x": "git checkout 5.x",
"docs:checkout:6x": "git checkout 6.x",
"docs:generate": "node ./scripts/website.js",
"docs:generate:search": "node ./scripts/generateSearch.js",
"docs:generate:sponsorData": "node ./scripts/loadSponsorData.js",
"docs:merge:stable": "git merge master",
"docs:merge:5x": "git merge 5.x",
Expand Down
2 changes: 1 addition & 1 deletion scripts/generateSearch.js
Expand Up @@ -126,7 +126,7 @@ run().catch(async error => {
});

async function run() {
await mongoose.connect(config.uri, { dbName: 'mongoose', serverSelectionTimeoutMS: 5000 });
await mongoose.connect(config.uri, { dbName: 'mongoose' });

// wait for the index to be created
await Content.init();
Expand Down
2 changes: 1 addition & 1 deletion scripts/website.js
Expand Up @@ -10,7 +10,7 @@ const pug = require('pug');
const pkg = require('../package.json');
const transform = require('acquit-require');
const childProcess = require("child_process");

require('./generateSearch');
// using "__dirname" and ".." to have a consistent CWD, this script should not be runnable, even when not being in the root of the project
// also a consistent root path so that it is easy to change later when the script should be moved
const cwd = path.resolve(__dirname, '..');
Expand Down