Skip to content

Commit

Permalink
chore(NODE-4824): add check to confirm docs generation and release on…
Browse files Browse the repository at this point in the history
…ly runs on main repo (#3468)
  • Loading branch information
baileympearson committed Nov 21, 2022
1 parent fda7d25 commit c4c560c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions etc/check-remote.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash

if git remote get-url --push origin | grep -qv "github.com:mongodb"; then
echo "git remote does not match node-mongodb-native. are you working off of a fork?"
exit 1
fi
2 changes: 2 additions & 0 deletions etc/docs/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ async function updateSiteTemplateForNewVersion(
}

async function main() {
await exec('bash ./etc/check-remote.sh');

chdir(__dirname);

const { tag, status, skipPrompts } = getCommandLineArguments();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"fix:eslint": "npm run check:eslint -- --fix",
"prepare": "node etc/prepare.js",
"preview:docs": "ts-node etc/docs/preview.ts",
"release": "standard-version -a -i HISTORY.md",
"release": "bash etc/check-remote.sh && standard-version -a -i HISTORY.md",
"test": "npm run check:lint && npm run test:all",
"test:all": "npm run check:unit && npm run check:test",
"update:docs": "npm run build:docs -- --yes"
Expand Down

0 comments on commit c4c560c

Please sign in to comment.