Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v5

- name: Build ${{ matrix.os }} Prebuild
run: node .github/scripts/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
run: node etc/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
shell: bash

- id: upload
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- if: matrix.build-mode == 'manual'
shell: bash
run: node .github/scripts/libmongocrypt.mjs
run: node etc/libmongocrypt.mjs

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
registry-url: "https://registry.npmjs.org"

- name: Build with Node.js ${{ matrix.node }} on ${{ matrix.os }}
run: node .github/scripts/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
run: node etc/libmongocrypt.mjs ${{ runner.os == 'Windows' && '--build' || '' }}
shell: bash

- name: Test ${{ matrix.os }}
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/scripts/utils.mjs → etc/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url));

/** Resolves to the root of this repository */
export function resolveRoot(...paths) {
return path.resolve(__dirname, '..', '..', ...paths);
return path.resolve(__dirname, '..', ...paths);
}

export function getCommitFromRef(ref) {
console.error(`resolving ref: ${ref}`);
const script = resolveRoot('.github', 'scripts', 'get-commit-from-ref.sh');
const script = resolveRoot('etc', 'get-commit-from-ref.sh');
const output = execSync(`bash ${script}`, { env: { REF: ref }, encoding: 'utf-8' })

const regex = /COMMIT_HASH=(?<hash>[a-zA-Z0-9]+)/
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
"addon",
"lib",
"src",
"binding.gyp"
"binding.gyp",
"etc/libmongocrypt.mjs",
"etc/utils.mjs",
"etc/get-commit-from-ref.sh"
],
"directories": {
"lib": "lib"
},
"scripts": {
"install:libmongocrypt": "node .github/scripts/libmongocrypt.mjs",
"install": "prebuild-install --runtime napi || node-gyp rebuild",
"install:libmongocrypt": "node etc/libmongocrypt.mjs",
"clean-install": "node etc/libmongocrypt.mjs --skip-bindings && node-gyp rebuild",
"install": "prebuild-install --runtime napi || npm run clean-install",
"clang-format": "clang-format --style=file:.clang-format --Werror -i addon/*",
"check:eslint": "ESLINT_USE_FLAT_CONFIG=false eslint src test",
"check:clang-format": "clang-format --style=file:.clang-format --dry-run --Werror addon/*",
Expand Down