-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
54 lines (46 loc) · 1.64 KB
/
build.sbt
File metadata and controls
54 lines (46 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import org.tmt.sbt.docs.DocKeys._
import org.tmt.sbt.docs.Settings
ThisBuild / scalaVersion := "3.6.4"
ThisBuild / organizationName := "TMT Org"
ThisBuild / docsRepo := "https://github.com/tmtsoftware/tmtsoftware.github.io.git"
ThisBuild / docsParentDir := "esw-gateway-ui-example"
ThisBuild / gitCurrentRepo := "https://github.com/tmtsoftware/esw-gateway-ui-example"
ThisBuild / version := sys.env.getOrElse("JITPACK_VERSION", "0.1.0-SNAPSHOT")
lazy val CSW_VERSION: Option[String] = sys.props.get("prod.publish").collect {
case "true" => "6.0.0"
}
lazy val ESW_VERSION: Option[String] = sys.props.get("prod.publish").collect {
case "true" => "1.0.2"
}
lazy val openSite =
Def.setting {
Command.command("openSite") { state =>
val uri = s"file://${Project.extract(state).get(siteDirectory)}/${docsParentDir.value}/${version.value}/index.html"
state.log.info(s"Opening browser at $uri ...")
java.awt.Desktop.getDesktop.browse(new java.net.URI(uri))
state
}
}
/* ================= Root Project ============== */
lazy val `esw-gateway-ui-example` = project
.in(file("."))
.enablePlugins(GithubPublishPlugin)
.aggregate(docs)
.settings(
commands += openSite.value,
Settings.makeSiteMappings(docs)
)
lazy val docs = project
.enablePlugins(ParadoxMaterialSitePlugin)
.settings(
version := {
sys.props.get("prod.publish") match {
case Some("true") => version.value
case _ => "0.1.0-SNAPSHOT"
}
},
paradoxProperties ++= Map(
"esw-version" -> ESW_VERSION.getOrElse("1.0.2"),
"csw-version" -> CSW_VERSION.getOrElse("6.0.0")
)
)