Compare commits

..

No commits in common. "7e668bd974369fd7ca7573e3ef1d684cdbeb046d" and "4faa9cb5e5dc7b6f88ae0b060c210cbf24510b6e" have entirely different histories.

4 changed files with 5 additions and 43 deletions

View File

@ -8,7 +8,7 @@ ARG DOCKER_BUILD=yes
RUN cd ./source \ RUN cd ./source \
&& sbt assembly \ && sbt assembly \
&& cd .. \ && cd .. \
&& cp ./source/morny-coeur/target/morny-coeur-docker-build.jar ./morny-coeur.jar && cp ./source/target/morny-coeur-docker-build.jar ./morny-coeur.jar
#&& rm -r ./source \ #&& rm -r ./source \
#&& rm -r /root/.gradle \ #&& rm -r /root/.gradle \

View File

@ -13,10 +13,7 @@ ThisBuild / resolvers ++= Seq(
ThisBuild / crossPaths := false ThisBuild / crossPaths := false
if (!MornyProject.publishWithDocJar) { ThisBuild / Compile / packageDoc / publishArtifact := false
(ThisBuild / packageDoc / publishArtifact := false) :: Nil
} else Nil
artifactName := {(sv: ScalaVersion, module: ModuleID, artifact: Artifact) => artifactName := {(sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
val classifier = artifact.classifier match { val classifier = artifact.classifier match {
case Some(value) => s"-$value" case Some(value) => s"-$value"
@ -53,8 +50,8 @@ ThisBuild / apiMappings ++= {
ThisBuild / publishTo := MornyProject.publishTo ThisBuild / publishTo := MornyProject.publishTo
ThisBuild / credentials ++= MornyProject.publishCredentials ThisBuild / credentials ++= MornyProject.publishCredentials
lazy val morny_system_lib = (project in file (MornyProject.morny_system_lib.id)) lazy val morny_system_lib = (project in file (MornyProject.morny_system_lib.id))
.enablePlugins(BuildInfoPlugin)
.settings( .settings(
name := MornyProject.morny_system_lib.name, name := MornyProject.morny_system_lib.name,
@ -114,44 +111,14 @@ lazy val morny_coeur = (project in file(MornyProject.morny_coeur.id))
) )
lazy val dockerImageName: SettingKey[String] = settingKey[String]("Docker image name that want to built")
lazy val dockerImageTag: SettingKey[String] = settingKey[String]("Docker image tag or aka image version of the built image")
lazy val dockerBuild: TaskKey[Unit] = taskKey("Build using system docker with current version as the container tag")
lazy val root = (project in file (".")) lazy val root = (project in file ("."))
.aggregate(morny_system_lib, morny_coeur) .aggregate(morny_system_lib, morny_coeur)
.settings( .settings(
name := "Coeur Morny Cono",
skip := true,
update / skip := false,
assembly / aggregate := false, assembly / aggregate := false,
assembly := { assembly := {
(morny_coeur / assembly).value (morny_coeur / assembly).value
}, },
run / aggregate := false,
run := { run := {
(morny_coeur / Compile / run).evaluated (morny_coeur / Compile / run).evaluated
},
dockerImageName := MornyProject.docker_image_name,
dockerImageTag := version.value,
dockerBuild := {
val builtImageName = dockerImageName.value
val builtImageTag = (ThisProject / dockerImageTag).value
sLog.value info s"Building docker image with name $builtImageName:$builtImageTag"
import scala.language.postfixOps
import scala.sys.process.*
s"docker build -t $builtImageName:$builtImageTag ."!
sLog.value info s"Built docker image $builtImageName:$builtImageTag"
} }
) )

View File

@ -6,7 +6,7 @@ object MornyConfiguration {
val MORNY_CODE_STORE = "https://github.com/Eyre-S/Coeur-Morny-Cono" val MORNY_CODE_STORE = "https://github.com/Eyre-S/Coeur-Morny-Cono"
val MORNY_COMMIT_PATH = "https://github.com/Eyre-S/Coeur-Morny-Cono/commit/%s" val MORNY_COMMIT_PATH = "https://github.com/Eyre-S/Coeur-Morny-Cono/commit/%s"
val VERSION = "2.0.0-alpha21" val VERSION = "2.0.0-alpha20"
val VERSION_DELTA: Option[String] = None val VERSION_DELTA: Option[String] = None
val CODENAME = "xinzheng" val CODENAME = "xinzheng"
@ -15,8 +15,6 @@ object MornyConfiguration {
val GROUP = "cc.sukazyo" val GROUP = "cc.sukazyo"
val GROUP_NAME = "A.C. Sukazyo Eyre" val GROUP_NAME = "A.C. Sukazyo Eyre"
val DOCKER_IMAGE_NAME = "coeur-morny-cono"
trait ProjectMetadata { trait ProjectMetadata {
val name: String val name: String
@ -67,7 +65,7 @@ object MornyConfiguration {
object Morny_Coeur extends ProjectMetadata with Runnable { object Morny_Coeur extends ProjectMetadata with Runnable {
override val name = "Morny Coeur" override val name = "Coeur Morny Cono"
override val id = "morny-coeur" override val id = "morny-coeur"
override val group = GROUP override val group = GROUP

View File

@ -44,10 +44,7 @@ object MornyProject {
val group = MornyConfiguration.GROUP val group = MornyConfiguration.GROUP
val group_name = MornyConfiguration.GROUP_NAME val group_name = MornyConfiguration.GROUP_NAME
val docker_image_name = MornyConfiguration.DOCKER_IMAGE_NAME
val publishWithFatJar = !version_is_snapshot val publishWithFatJar = !version_is_snapshot
val publishWithDocJar = !version_is_snapshot
def publishTo = MornyConfiguration.publishTo def publishTo = MornyConfiguration.publishTo
val publishCredentials = MornyConfiguration.publishCredentials val publishCredentials = MornyConfiguration.publishCredentials