File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ jobs:
30
30
run : sbt +publishLocal
31
31
32
32
# 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
35
35
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
38
38
39
39
- 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
+
1
3
inThisBuild(
2
4
List (
3
5
organization := " com.alexitc" ,
@@ -16,6 +18,8 @@ inThisBuild(
16
18
17
19
ThisBuild / versionScheme := Some (" early-semver" )
18
20
21
+ lazy val printVersion = TaskKey [Unit ](" printVersion" )
22
+
19
23
lazy val commonSettings = Seq (
20
24
scalacOptions ++= {
21
25
Seq (
@@ -78,5 +82,9 @@ val root = project
78
82
.in(file(" ." ))
79
83
.aggregate(bindings, plugin)
80
84
.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
+ }
82
90
)
You can’t perform that action at this time.
0 commit comments