Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
WellRedPandit committed Apr 10, 2017
1 parent 45b375a commit ecebf2a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
17 changes: 10 additions & 7 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,16 @@ object TronBuild extends Build {
import java.nio.file._
import java.nio.file.attribute.PosixFilePermission._
import scala.collection.JavaConversions._
sbt.IO.delete(new File("dist"))
sbt.IO.copyFile(new File("target/scala-2.12/smehotron.jar"), new File("dist/smehotron.jar"), true)
sbt.IO.copyFile(new File("scripts/smehotron"), new File("dist/smehotron"), true)
sbt.IO.copyFile(new File("scripts/smehotron.bat"), new File("dist/smehotron.bat"), true)
scala.util.Try(Files.setPosixFilePermissions(Paths.get("dist/smehotron"), Set(OWNER_EXECUTE, OWNER_READ, OWNER_WRITE)))
sbt.IO.copyDirectory(new File("saxon"), new File("dist/saxon"), false, true)
sbt.IO.copyDirectory(new File("schematron"), new File("dist/schematron"), false, true)
val releaseDir = s"smehotron-${V.tron}"
sbt.IO.delete(new File(releaseDir))
sbt.IO.delete(new File(s"$releaseDir.zip"))
sbt.IO.copyFile(new File("target/scala-2.12/smehotron.jar"), new File(s"$releaseDir/smehotron.jar"), true)
sbt.IO.copyFile(new File("scripts/smehotron"), new File(s"$releaseDir/smehotron"), true)
sbt.IO.copyFile(new File("scripts/smehotron.bat"), new File(s"$releaseDir/smehotron.bat"), true)
scala.util.Try(Files.setPosixFilePermissions(Paths.get(s"$releaseDir/smehotron"), Set(OWNER_EXECUTE, OWNER_READ, OWNER_WRITE)))
sbt.IO.copyDirectory(new File("saxon"), new File(s"$releaseDir/saxon"), false, true)
sbt.IO.copyDirectory(new File("schematron"), new File(s"$releaseDir/schematron"), false, true)
s"zip -r $releaseDir.zip $releaseDir" !
},
dist <<= dist.dependsOn(assembly),
initialCommands in console :=
Expand Down
2 changes: 1 addition & 1 deletion project/Deps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ object V {
val scalaXml = "1.0.6"
val scopt = "3.5.0"
val slf4j = "1.7.25"
val tron = "1.0.1"
val tron = "1.0.5"
}

object Deps {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/wrp/smehotron/Smehotron.scala
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ case class MainArgs(rules: Option[File] = None,

object Smehotron extends LazyLogging {
val parser = new scopt.OptionParser[MainArgs]("smehotron") {
head("smehotron", "1.0.4")
head("smehotron", "1.0.5")

opt[File]('c', "cfg").minOccurs(0).maxOccurs(1)
.valueName("<config-file>")
Expand Down

0 comments on commit ecebf2a

Please sign in to comment.