Skip to content

Commit fe75660

Browse files
Merge pull request #152 from github/vercel/pkg
Add vercel/pkg to create standalone CLI
2 parents c039c3b + 80a22f4 commit fe75660

File tree

3,351 files changed

+4750
-444081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,351 files changed

+4750
-444081
lines changed

.github/workflows/cli.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111

12-
# Build the CLI
1312
- name: Build CLI
14-
run: npm run build-cli
13+
run: |
14+
cd packaging
15+
npm install
16+
npm run build-cli
1517
16-
# Upload an empty SARIF file
1718
- name: Upload with CLI
18-
run: node cli/code-scanning-cli.js upload --sarif-file src/testdata/empty-sarif.sarif --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_API_URL --github-auth ${{ github.token }}
19+
run: |
20+
packaging/dist/code-scanning-cli-linux upload \
21+
--sarif-file src/testdata/empty-sarif.sarif \
22+
--repository $GITHUB_REPOSITORY \
23+
--commit $GITHUB_SHA \
24+
--ref $GITHUB_REF \
25+
--github-url $GITHUB_API_URL \
26+
--github-auth ${{ github.token }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/cli/
2-
1+
/packaging/dist/
2+
/packaging/node_modules/

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Running locally will generate the CodeQL database and run all the queries, but i
4949

5050
As well as the unit tests (see _Common tasks_ above), there are integration tests, defined in `.github/workflows/integration-testing.yml`. These are run by a CI check. Depending on the change you’re making, you may want to add a test to this file or extend an existing one.
5151

52+
### Building the CLI
53+
54+
Navigate to the `packaging` directory and run `npm install` to install dependencies needed only for compiling the CLI. Run `npm run build-cli` to output files to the `packaging/dist` directory.
55+
5256
## Submitting a pull request
5357

5458
1. [Fork][fork] and clone the repository

node_modules/.bin/atob

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/errno

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/json5

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/miller-rabin

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/sha.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/terser

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/webpack

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)