File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed
src/main/scala/com/sourcegraph/sbtsourcegraph Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 77jobs :
88 lsif :
99 runs-on : ubuntu-latest
10- name : " Upload LSIF "
10+ name : " Upload SCIP "
1111 steps :
1212 - uses : actions/checkout@v2
1313 - uses : actions/setup-java@v3
1414 with :
1515 distribution : " temurin"
1616 cache : " sbt"
1717 java-version : 17
18- - run : |
19- curl -fL "https://github. com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz" | gzip -d > cs && chmod +x cs
20- ./cs launch com.sourcegraph:scip-java_2.13:latest.stable -M com.sourcegraph.scip_java.ScipJava -- index
18+ - run : sbt dumpVersion publishLocal
19+ - run : echo "addSbtPlugin(\" com.sourcegraph\" % \"sbt-sourcegraph\" % \"$(cat VERSION)\")" > project/sourcegraph_generated.sbt
20+ - run : sbt sourcegraphEnable sourcegraphScip
2121 - run : yarn global add @sourcegraph/src
2222 - run : |
23+ mv target/sbt-sourcegraph/index.scip index.scip
2324 src code-intel upload "-commit=${GITHUB_SHA}" "-github-token=${GITHUB_TOKEN}"
2425 env:
2526 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -84,3 +84,15 @@ scriptedLaunchOpts ++= Seq(
8484 s " -Dscip-java.version= ${Versions .semanticdbJavacVersion()}" ,
8585 s " -Dplugin.version= ${version.value}"
8686)
87+
88+ lazy val dumpVersion = taskKey[Unit ](
89+ " Dump the version of sbt-sourcegraph to a VERSION file"
90+ )
91+ dumpVersion := {
92+ val versionValue = version.value
93+
94+ val path = (ThisBuild / baseDirectory).value / " VERSION"
95+ IO .write(path, versionValue)
96+
97+ sLog.value.info(s " Dumping version [ $versionValue] to path [ $path] " )
98+ }
Original file line number Diff line number Diff line change @@ -142,13 +142,13 @@ object Versions {
142142 segments match {
143143 // Java 1.6 - 1.8
144144 case " 1" :: lessThan8 :: _ :: Nil => lessThan8.toInt
145- // Java 17.0.1, ..
146- case modern :: _ :: _ :: Nil => modern.toInt
145+ // Java 17.0.1, 11.0.20.1, ..
146+ case modern :: _ :: _ :: rest => modern.toInt
147147 // Java 12
148148 case modern :: Nil => modern.toInt
149149 case other =>
150150 sys.error(
151- s " Cannot process java.home property, unknown format: [ $raw] "
151+ s " Cannot process [ java.version] property, unknown format: [ $raw] "
152152 )
153153 }
154154 }
You can’t perform that action at this time.
0 commit comments