Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Publish CLI locally and use that version in the sbt-sourcegraph run
  • Loading branch information
keynmol committed Apr 21, 2023
commit 7f44dacf50a60009869961d3474230995f6ab28a
6 changes: 4 additions & 2 deletions .github/workflows/sourcegraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ jobs:
- name: Install src
run: yarn global add @sourcegraph/src

- name: sbt sourcegraphUpload
run: sbt sourcegraphUpload
- name: Publish CLI locally
run: sbt publishLocal dumpScipJavaVersion

- name: Upload sourcegraph data
run: sbt -Dscip-java-version=$(cat VERSION) sourcegraphUpload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ bazel-scip-java
bazel-out
bazel-testlogs
bazel-lsif-java

VERSION
11 changes: 11 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ lazy val bench = project
lazy val docs = project
.in(file("scip-java-docs"))
.settings(
publishLocal / skip := true,
publish / skip := true,
moduleName := "scip-java-docs",
mdocOut :=
(ThisBuild / baseDirectory).value / "website" / "target" / "docs",
Expand Down Expand Up @@ -525,3 +527,12 @@ lazy val fatjarPackageSettings = List[Def.Setting[_]](
).transform(node).head
}
)

lazy val dumpScipJavaVersion = taskKey[Unit](
"Dump the version of scip-java tool to a VERSION file"
)
dumpScipJavaVersion := {
val versionValue = (cli / version).value

IO.write((ThisBuild / baseDirectory).value / "VERSION", versionValue)
}