summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-02-04 00:25:29 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-02-04 00:25:29 -0800
commitf7a46fe9fb756803e3fdd81f427a7fd42001e71e (patch)
treed4ab21a64cf08833a28c0b11898c889c5a361122
parentf3ea6a59233a05792df49ede660c904c67f6c684 (diff)
downloadmill-f7a46fe9fb756803e3fdd81f427a7fd42001e71e.tar.gz
mill-f7a46fe9fb756803e3fdd81f427a7fd42001e71e.tar.bz2
mill-f7a46fe9fb756803e3fdd81f427a7fd42001e71e.zip
Remove the default `publishVersion` from `PublishModule`, and add `--batch` to gpg shellout to avoid popping up a password screen
-rwxr-xr-xbuild.sc7
-rw-r--r--scalalib/src/mill/scalalib/PublishModule.scala2
-rw-r--r--scalalib/src/mill/scalalib/ScalaModule.scala2
-rw-r--r--scalalib/src/mill/scalalib/publish/SonatypePublisher.scala2
-rw-r--r--shared.sc2
5 files changed, 8 insertions, 7 deletions
diff --git a/build.sc b/build.sc
index c0a2a55a..e6c45175 100755
--- a/build.sc
+++ b/build.sc
@@ -9,6 +9,7 @@ import mill.modules.Jvm.createAssembly
trait MillPublishModule extends PublishModule{
def scalaVersion = "2.12.4"
+ def publishVersion = "0.0.1"
def artifactName = "mill-" + super.artifactName()
def pomSettings = PomSettings(
description = artifactName(),
@@ -70,16 +71,14 @@ object core extends MillModule {
ivy"com.lihaoyi:::ammonite:1.0.3-21-05b5d32"
)
- def generatedSources = T {
+ def generatedSources = T.sources {
shared.generateCoreSources(T.ctx().dest)
- Agg(PathRef(T.ctx().dest))
}
val test = new Tests(implicitly)
class Tests(ctx0: mill.define.Ctx) extends super.Tests(ctx0){
- def generatedSources = T {
+ def generatedSources = T.sources {
shared.generateCoreTestSources(T.ctx().dest)
- Agg(PathRef(T.ctx().dest))
}
}
}
diff --git a/scalalib/src/mill/scalalib/PublishModule.scala b/scalalib/src/mill/scalalib/PublishModule.scala
index cedcdf8a..58334e41 100644
--- a/scalalib/src/mill/scalalib/PublishModule.scala
+++ b/scalalib/src/mill/scalalib/PublishModule.scala
@@ -11,7 +11,7 @@ trait PublishModule extends ScalaModule { outer =>
import mill.scalalib.publish._
def pomSettings: T[PomSettings]
- def publishVersion: T[String] = "0.0.1-SNAPSHOT"
+ def publishVersion: T[String]
def pom = T {
val dependencies =
diff --git a/scalalib/src/mill/scalalib/ScalaModule.scala b/scalalib/src/mill/scalalib/ScalaModule.scala
index 01f0d7ac..88c2e82e 100644
--- a/scalalib/src/mill/scalalib/ScalaModule.scala
+++ b/scalalib/src/mill/scalalib/ScalaModule.scala
@@ -189,7 +189,7 @@ trait ScalaModule extends mill.Module with TaskModule { outer =>
mainArgs = (files ++ options).toSeq
)
- createJar(Agg(javadocDir))(outDir / "javadoc.jar")
+ createJar(Agg(javadocDir))(outDir)
}
def sourcesJar = T {
diff --git a/scalalib/src/mill/scalalib/publish/SonatypePublisher.scala b/scalalib/src/mill/scalalib/publish/SonatypePublisher.scala
index 0749b0c5..52271a48 100644
--- a/scalalib/src/mill/scalalib/publish/SonatypePublisher.scala
+++ b/scalalib/src/mill/scalalib/publish/SonatypePublisher.scala
@@ -128,7 +128,7 @@ class SonatypePublisher(uri: String,
private def poorMansSign(file: Path, passphrase: String): Path = {
val fileName = file.toString
import ammonite.ops.ImplicitWd._
- %("gpg", "--yes", "-a", "-b", "--passphrase", passphrase, fileName)
+ %("gpg", "--yes", "-a", "-b", "--batch", "--passphrase", passphrase, fileName)
Path(fileName + ".asc")
}
diff --git a/shared.sc b/shared.sc
index 10d1e148..c7656961 100644
--- a/shared.sc
+++ b/shared.sc
@@ -137,11 +137,13 @@ def generateCoreSources(p: Path) = {
generateApplyer(p)
generateTarget(p)
generateEval(p)
+ p
}
@main
def generateCoreTestSources(p: Path) = {
generateApplicativeTest(p)
+ p
}