File tree Expand file tree Collapse file tree 6 files changed +15
-17
lines changed Expand file tree Collapse file tree 6 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ jobs:
12
12
- run : yarn install
13
13
- run : yarn global add ts-node
14
14
- run : ts-node src/main.ts index
15
- - name : Convert LSIF Typed into LSIF Graph
15
+ - run : cp index.scip dump.lsif-typed
16
+ - name : Install src-cli
16
17
run : |
17
- curl -Lo lsif-typed https://github.com/sourcegraph/lsif-typescript/releases/download/v0.1.8/lsif-typed && chmod +x lsif-typed
18
- ./lsif-typed dump.lsif-typed > dump.lsif
19
- - name : Upload LSIF data
20
- uses : sourcegraph/lsif-upload-action@master
21
- with :
22
- github_token : ${{ secrets.GITHUB_TOKEN }}
18
+ curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o src-cli
19
+ chmod +x ./src-cli
20
+ - run : ./src-cli lsif upload -file=dump.lsif-typed "-commit=${GITHUB_SHA}" "-github-token=${GITHUB_TOKEN}"
21
+ env :
22
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Generate snapshots and update.
25
25
``` sh
26
26
cd /path/to/dir
27
27
DIR=/path/to/scip-typescript " $DIR /node_modules/.bin/ts-node" " $DIR /src/main.ts" index # add --yarn-workspaces if applicable
28
- lsif-typed dump.lsif-typed > dump.lsif # from github.com/sourcegraph/sourcegraph/lib/codeintel/tools/lsif-typed
28
+ lsif-typed index.scip > dump.lsif # from github.com/sourcegraph/sourcegraph/lib/codeintel/tools/lsif-typed
29
29
lsif-java snapshot-lsif # from github.com/sourcegraph/lsif-java
30
30
```
31
31
Original file line number Diff line number Diff line change 1
- FROM sourcegraph/src-cli:3.39.1@sha256:418225d34348a80613a6a20c6c0203d95a74a33adc6fb6e6f45af84ff60beff0 AS src-cli
1
+ FROM sourcegraph/src-cli:3.40.0
2
2
3
3
# Keep in sync with default Dockerfile
4
4
FROM node:17.7.1-alpine3.14@sha256:cbb62fa2f740959b173b180e4806a5e479fbbd7a20072c3d6b4283bf2b9951d1
@@ -9,9 +9,7 @@ RUN apk add --no-cache git bash curl ca-certificates python3 make libstdc++ libg
9
9
10
10
COPY --from=src-cli /usr/bin/src /usr/bin
11
11
12
- RUN curl -Lo /usr/bin/lsif-typed https://github.com/sourcegraph/lsif-typescript/releases/download/v0.1.13/lsif-typed && chmod +x /usr/bin/lsif-typed
13
-
14
- RUN echo 'scip-typescript "$@" --no-progress-bar && lsif-typed dump.lsif-typed > dump.lsif' > /usr/bin/scip-typescript-autoindex && chmod +x /usr/bin/scip-typescript-autoindex
12
+ RUN echo 'scip-typescript "$@" --no-progress-bar' > /usr/bin/scip-typescript-autoindex && chmod +x /usr/bin/scip-typescript-autoindex
15
13
16
14
RUN npm install --global n@latest @sourcegraph/scip-typescript@latest
17
15
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ checkIndexParser([], {
27
27
progressBar : true ,
28
28
cwd : process . cwd ( ) ,
29
29
inferTsconfig : false ,
30
- output : 'dump.lsif-typed ' ,
30
+ output : 'index.scip ' ,
31
31
yarnWorkspaces : false ,
32
32
} )
33
33
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export function mainCommand(
40
40
"whether to infer the tsconfig.json file, if it's missing" ,
41
41
false
42
42
)
43
- . option ( '--output <path>' , 'path to the output file' , 'dump.lsif-typed ' )
43
+ . option ( '--output <path>' , 'path to the output file' , 'index.scip ' )
44
44
. option ( '--no-progress-bar' , 'whether to disable the progress bar' )
45
45
. argument ( '[projects...]' )
46
46
. action ( ( parsedProjects , parsedOptions ) => {
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ for (const snapshotDirectory of snapshotDirectories) {
45
45
) as PackageJson
46
46
const tsconfigJsonPath = path . join ( inputRoot , 'tsconfig.json' )
47
47
const inferTsconfig = ! fs . existsSync ( tsconfigJsonPath )
48
- const output = path . join ( inputRoot , 'dump.lsif-typed ' )
48
+ const output = path . join ( inputRoot , 'index.scip ' )
49
49
indexCommand ( [ ] , {
50
50
cwd : inputRoot ,
51
51
inferTsconfig,
@@ -58,10 +58,10 @@ for (const snapshotDirectory of snapshotDirectories) {
58
58
fs . rmSync ( tsconfigJsonPath )
59
59
}
60
60
const index = lsif . lib . codeintel . lsiftyped . Index . deserializeBinary (
61
- fs . readFileSync ( path . join ( inputRoot , 'dump.lsif-typed ' ) )
61
+ fs . readFileSync ( path . join ( inputRoot , 'index.scip ' ) )
62
62
)
63
63
fs . mkdirSync ( outputRoot , { recursive : true } )
64
- fs . renameSync ( output , path . join ( outputRoot , 'dump.lsif-typed ' ) )
64
+ fs . renameSync ( output , path . join ( outputRoot , 'index.scip ' ) )
65
65
if ( index . documents . length === 0 ) {
66
66
throw new Error ( 'empty LSIF index' )
67
67
}
You can’t perform that action at this time.
0 commit comments