Fix _to_be_replaced

This commit is contained in:
Josh Soref 2019-09-23 18:08:29 -04:00
parent 7a51eda367
commit 07814bc576
1 changed files with 8 additions and 1 deletions

View File

@ -172,8 +172,15 @@ val root = (project in file(".")).
mappings in Universal := {
val t = (target in Universal).value
val prev = (mappings in Universal).value
val BinBat = "bin" + java.io.File.separator + "sbt.bat"
val BinSbt = "bin" + java.io.File.separator + "sbt"
val BinBat = BinSbt + ".bat"
prev.toList map {
case (k, BinSbt) =>
val x = IO.read(k)
IO.write(t / "sbt", x.replaceAllLiterally(
"declare init_sbt_version=_to_be_replaced",
s"""declare init_sbt_version=$sbtVersionToRelease"""))
(t / "sbt", BinSbt)
case (k, BinBat) =>
val x = IO.read(k)
IO.write(t / "sbt.bat", x.replaceAllLiterally(