Skip to content

Commit

Permalink
Fix version upgrade for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
plokhotnyuk committed Dec 1, 2023
1 parent 42a5ba4 commit c7524b5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions release.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ lazy val updateVersionInReadmeAndExamples: ReleaseStep = { st: State =>

def updateFile(path: String): Unit = {
val oldContent = IO.read(file(path))
val newContent = oldContent.replaceAll('"' + oldVersion + '"', '"' + newVersion + '"')
val newContent = oldContent
.replaceAll('"' + oldVersion + '"', '"' + newVersion + '"')
.replaceAll('-' + oldVersion + '-', '-' + newVersion + '-')
.replaceAll(':' + oldVersion + '"', ':' + newVersion + '"')
IO.write(file(path), newContent)
s"git add $path" !! st.log
}

updateFile("README.md")
updateFile("jsoniter-scala-examples/build.sbt")
(1 to 3).foreach(n => updateFile(s"jsoniter-scala-examples/example0$n.sc"))

st
}

Expand Down

0 comments on commit c7524b5

Please sign in to comment.