Skip to content

Commit 98b7feb

Browse files
authored
Install src via npm instead of curl command (#145)
1 parent 47d51b4 commit 98b7feb

File tree

5 files changed

+9
-41
lines changed

5 files changed

+9
-41
lines changed

.github/workflows/lsif-typescript.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/sourcegraph.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v3
1212
- run: yarn install
13-
- run: yarn global add ts-node
13+
- run: yarn global add ts-node @sourcegraph/src
1414
- run: ts-node src/main.ts index
15-
- run: cp index.scip dump.lsif-typed
16-
- name: Install src-cli
17-
run: |
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}"
15+
- run: src code-intel upload "-commit=${GITHUB_SHA}" "-github-token=${GITHUB_TOKEN}"
2116
env:
2217
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ ARG TAG
55

66
RUN apk add --no-cache git curl
77

8-
RUN curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/bin/src && chmod +x /usr/bin/src
9-
10-
RUN yarn global add @sourcegraph/scip-typescript@${TAG}
8+
RUN yarn global add @sourcegraph/scip-typescript@${TAG} @sourcegraph/src
119

1210
CMD ["/bin/sh"]

Dockerfile.autoindex

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ ENV NODE_OPTIONS=--max-old-space-size=4096
55

66
RUN apk add --no-cache git bash curl ca-certificates python3 make libstdc++ libgcc gcc g++ pkgconfig python2 automake autoconf curl
77

8+
# The following line is kept for legacy reasons. We previously invoke the
9+
# `scip-typescript-autoindex` script during auto-indexing in order to handle
10+
# SCIP->LSIF conversion. This script is no longer needed since src handles the
11+
# conversion.
812
RUN echo 'scip-typescript "$@" --no-progress-bar' > /usr/bin/scip-typescript-autoindex && chmod +x /usr/bin/scip-typescript-autoindex
913

10-
RUN curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/bin/src && chmod +x /usr/bin/src
11-
12-
RUN yarn global add @sourcegraph/scip-typescript@${TAG}
14+
RUN yarn global add @sourcegraph/scip-typescript@${TAG} @sourcegraph/src
1315

1416
CMD ["/bin/sh"]

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ scip-typescript index --yarn-workspaces
4747
Add the following run steps to your CI pipeline:
4848

4949
```sh
50-
npm install -g @sourcegraph/scip-typescript
50+
npm install -g @sourcegraph/scip-typescript @sourcegraph/src
5151
npm install # or yarn install
5252
scip-typescript index
53-
# From https://github.com/sourcegraph/src-cli/
54-
curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o /usr/local/bin/src
55-
chmod +x /usr/local/bin/src
5653
# Upload index with any necessary tokens (shown here using GitHub workflow syntax)
5754
src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
5855
```

0 commit comments

Comments
 (0)