Skip to content

Commit

Permalink
Merge pull request #14452 from Automattic/IslandRhythms/consolidate-s…
Browse files Browse the repository at this point in the history
…cripts

consolidate scripts
  • Loading branch information
vkarpov15 committed Mar 20, 2024
2 parents e3f3205 + 49e2635 commit c3c405e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
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

0 comments on commit c3c405e

Please sign in to comment.