File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ jobs:
3030 run : sbt +publishLocal
3131
3232 # Examples
33- - name : Compile examples - check library version
34- run : sbt version | tail -n 1 | awk -F " " '{print $2}' > .version
33+ - name : Update examples/build.sbt
34+ run : sed -i -e "s#SCALAJS_CHROME_VERSION#$(sbt printVersion && cat .version)#" examples/build.sbt
3535
36- - name : Compile examples - set library version
37- run : sed -i -e "s#SCALAJS_CHROME_VERSION#$(cat .version)#" examples/project/plugins. sbt && sed -i -e "s#SCALAJS_CHROME_VERSION#$( cat .version)#" examples/build .sbt
36+ - name : Update examples/project/plugins.sbt
37+ run : sed -i -e "s#SCALAJS_CHROME_VERSION#$(sbt printVersion && cat .version)#" examples/project/plugins .sbt
3838
3939 - name : Compile examples
40- run : cd examples && sbt compile
40+ run : cd examples && cat build. sbt && sbt chromePackage
Original file line number Diff line number Diff line change 1+ import java .nio .file .Files
2+
13inThisBuild(
24 List (
35 organization := " com.alexitc" ,
@@ -16,6 +18,8 @@ inThisBuild(
1618
1719ThisBuild / versionScheme := Some (" early-semver" )
1820
21+ lazy val printVersion = TaskKey [Unit ](" printVersion" )
22+
1923lazy val commonSettings = Seq (
2024 scalacOptions ++= {
2125 Seq (
@@ -78,5 +82,9 @@ val root = project
7882 .in(file(" ." ))
7983 .aggregate(bindings, plugin)
8084 .settings(
81- publish / skip := true
85+ publish / skip := true ,
86+ printVersion := {
87+ val targetFile = baseDirectory.value / " .version"
88+ Files .write(targetFile.toPath, version.value.getBytes(IO .utf8))
89+ }
8290 )
You can’t perform that action at this time.
0 commit comments