Skip to content

Commit

Permalink
Add plugin.xml template and generation
Browse files Browse the repository at this point in the history
  • Loading branch information
manojlds committed Nov 9, 2018
1 parent a912f58 commit dc95a7e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,16 @@ lazy val root = (project in file(".")).
version := appVersion
)),
name := "mlflow-gocd",
libraryDependencies ++= Seq(goPluginLibrary, gson, apacheCommons, httpClient, scalaTest)
libraryDependencies ++= Seq(goPluginLibrary, gson, apacheCommons, httpClient, scalaTest),
resourceGenerators in Compile += Def.task {
val inputFile = baseDirectory.value / "template" / "plugin.xml"
val outputFile = (resourceManaged in Compile).value / "plugin.xml"
val contents = IO.read(inputFile)
IO.write(outputFile, contents.replaceAll("\\$\\{version\\}", appVersion))
Seq(outputFile)
}.taskValue,
mappings in (Compile, packageBin) += {
(resourceManaged in Compile).value / "plugin.xml" -> "plugin.xml"
},
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
)
18 changes: 18 additions & 0 deletions template/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<go-plugin id="mlflow-gocd" version="1">
<about>
<name>MLFlow Package Plugin</name>
<version>${version}</version>
<target-go-version>17.2.0</target-go-version>
<description>MLFlow as package source for GoCD</description>
<vendor>
<name>Indix</name>
<url>http://www.indix.com</url>
</vendor>
<target-os>
<value>Linux</value>
<value>Mac OS X</value>
<value>Windows</value>
</target-os>
</about>
</go-plugin>

0 comments on commit dc95a7e

Please sign in to comment.