Skip to content

Commit

Permalink
Publish and use launcher assembly jar (#91)
Browse files Browse the repository at this point in the history
* Publish and use launcher assembly jar

* Import PublishInfo
  • Loading branch information
justin-corn authored Nov 8, 2022
1 parent e69971b commit 770b07d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .morphir-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1-M01
0.1.1-M04
8 changes: 8 additions & 0 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import mill._, scalalib._, scalafmt._
import mill.contrib.buildinfo.BuildInfo
import mill.define.Sources
import mill.modules.Jvm
import mill.scalalib.publish.PublishInfo
import os.Path

import Deps._
Expand Down Expand Up @@ -239,6 +240,13 @@ object morphir extends Module {
Map("version" -> maybeLastTaggedVersion.getOrElse("0.0.0"))
}
object test extends Tests with MorphirTestModule {}

// also publish the assembly jar
override def extraPublish: T[Seq[PublishInfo]] = T {
Seq(
PublishInfo(file = assembly(), classifier = Some("assembly"), ivyConfig = "compile")
)
}
}

object msc extends Module {
Expand Down
5 changes: 3 additions & 2 deletions launch
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
set -euo pipefail
#set -x

FALLBACK_MORPHIR_VERSION=0.1.1-M01
FALLBACK_MORPHIR_VERSION=0.1.1-M04
MORPHIR_VERSION_FILE=.morphir-version
CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}/morphir/launcher"
URL_FMT=https://repo1.maven.org/maven2/org/finos/morphir/morphir-tools-launcher_2.13/%s/morphir-tools-launcher_2.13-%s-assembly.jar

_log() {
echo $* >/dev/stderr
Expand Down Expand Up @@ -74,7 +75,7 @@ curl_download() {
launcher_jar_url() {
local ver="$1"

echo https://repo1.maven.org/maven2/org/finos/morphir/morphir-tools-launcher_3/$ver/morphir-tools-launcher_3-$ver.jar
printf $URL_FMT $ver $ver
}

main() {
Expand Down

0 comments on commit 770b07d

Please sign in to comment.