Skip to content

Commit

Permalink
Migrated to scala-cli for helper script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Mengelt committed Nov 15, 2024
1 parent d84a61d commit b7fe428
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ meta.json
/.camunda/
/**/.generated/

/.scala-build/
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ lazy val root = project
.configure(preventPublication)
.settings(
name := "camundala",
organization := org
organization := org,
sourcesInBase := false
)
.aggregate(
documentation,
Expand Down
24 changes: 8 additions & 16 deletions publish-release.sc → helper.scala
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import mainargs.*
import $ivy.`io.github.pme123:camundala-helper_3:1.29.21 compat`, camundala.helper.*

/** <pre> Creates a new Release for the client and publishes to Github/pme123/camundala:
*
* amm ./publish-release.sc <VERSION>
*
* # Example SNAPSHOT (only publish to Github/pme123/camundala) amm ./publish-release.sc 0.2.5-SNAPSHOT
*
* # Example (publish to Github/pme123/camundala and GIT Tagging and increasing Version to next minor
* Version) amm ./publish-release.sc 0.2.5
*/

@arg(doc = "> Creates a new Release and publishes to Maven Central")
#!/usr/bin/env -S scala shebang

//> using toolkit 0.5.0
//> using dep io.github.pme123::camundala-helper:1.30.23

import camundala.helper.*

@main
def release(version: String): Unit =
println(s"Publishing camundala: $version")
Expand Down Expand Up @@ -55,8 +48,7 @@ private def replaceVersion(newVersion: String) =
val versionsPath = os.pwd / "version"
os.write.over(versionsPath, newVersion)

private def runInConsole(proc: String*) = {
private def runInConsole(proc: String*) =
println(proc.mkString(" "))
val result = os.proc(proc).call()
println(result.out.text())
}

0 comments on commit b7fe428

Please sign in to comment.