summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-02-10 09:46:41 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-02-10 09:47:14 -0800
commitd7c05de2a43611ab25597b8fc299a67dd47c8a9e (patch)
tree15f3ce3121e6c02424441e8e7d591f9f2480733b
parent31da68db49d95d8863f34392adf604df538d8cd5 (diff)
downloadmill-d7c05de2a43611ab25597b8fc299a67dd47c8a9e.tar.gz
mill-d7c05de2a43611ab25597b8fc299a67dd47c8a9e.tar.bz2
mill-d7c05de2a43611ab25597b8fc299a67dd47c8a9e.zip
Re-enable github artifact upload
-rwxr-xr-xbuild.sc6
-rwxr-xr-xci/release.py6
-rw-r--r--docs/intro.md182
3 files changed, 118 insertions, 76 deletions
diff --git a/build.sc b/build.sc
index a80c308a..f9066dbd 100755
--- a/build.sc
+++ b/build.sc
@@ -239,7 +239,9 @@ def publishVersion = T.input{
}
}
-def uploadToGithub(assembly: Path, authKey: String, release: String, label: String) = {
+def uploadToGithub(authKey: String) = T.command{
+ val (release, label) = publishVersion()
+
if (release != "unstable"){
scalaj.http.Http("https://api.github.com/repos/lihaoyi/mill/releases")
.postData(
@@ -254,5 +256,5 @@ def uploadToGithub(assembly: Path, authKey: String, release: String, label: Stri
.asString
}
- upload.apply(assembly, release, label, authKey)
+ upload.apply(releaseAssembly().path, release, label, authKey)
}
diff --git a/ci/release.py b/ci/release.py
index f1e8940c..541774f3 100755
--- a/ci/release.py
+++ b/ci/release.py
@@ -28,3 +28,9 @@ if is_master_commit:
"--release",
"true"
])
+
+ check_call([
+ "target/bin/mill",
+ "uploadToGithub",
+ os.environ["GITHUB_ACCESS_TOKEN"]
+ ])
diff --git a/docs/intro.md b/docs/intro.md
index fc33359b..30b455e9 100644
--- a/docs/intro.md
+++ b/docs/intro.md
@@ -46,6 +46,114 @@ The most common **tasks** that Mill can run are cached **targets**, such as
re-evaluate unless one of their inputs changes, where-as commands re-run every
time.
+
+### Multiple Modules
+
+```scala
+import mill._
+import mill.scalalib._
+object foo extends ScalaModule {
+ def scalaVersion = "2.12.4"
+}
+object bar extends ScalaModule {
+ def moduleDeps = Seq(foo)
+ def scalaVersion = "2.12.4"
+}
+```
+
+You can define multiple modules the same way you define a single module, using
+`def moduleDeps` to define the relationship between them. The above build
+expects the following project layout:
+
+```
+build.sc
+foo/
+ src/
+ Main.scala
+ resources/
+ ...
+bar/
+ src/
+ Main2.scala
+ resources/
+ ...
+out/
+ foo/
+ ...
+ bar/
+ ...
+```
+
+And can be built/run using:
+
+```bash
+$ mill foo.compile
+$ mill bar.compile
+
+$ mill foo.run
+$ mill bar.run
+
+$ mill foo.jar
+$ mill bar.jar
+
+$ mill foo.assembly
+$ mill bar.assembly
+```
+
+Mill's evaluator will ensure that the modules are compiled in the right order,
+and re-compiled as necessary when source code in each module changes.
+
+Modules can also be nested:
+
+```scala
+import mill._
+import mill.scalalib._
+object foo extends ScalaModule {
+ def scalaVersion = "2.12.4"
+ object bar extends ScalaModule {
+ def moduleDeps = Seq(foo)
+ def scalaVersion = "2.12.4"
+ }
+}
+```
+
+Which would result in a similarly nested project layout:
+
+```
+build.sc
+foo/
+ src/
+ Main.scala
+ resources/
+ ...
+ bar/
+ src/
+ Main2.scala
+ resources/
+ ...
+out/
+ foo/
+ ...
+ bar/
+ ...
+```
+
+Where the nested modules can be run via:
+
+```bash
+$ mill foo.compile
+$ mill foo.bar.compile
+
+$ mill foo.run
+$ mill foo.bar.run
+
+$ mill foo.jar
+$ mill foo.bar.jar
+
+$ mill foo.assembly
+$ mill foo.bar.assembly
+```
+
### Watch and Re-evaluate
You can use the `--watch` flag to make Mill watch a task's inputs, re-evaluating
@@ -363,80 +471,6 @@ Each of which will expect their sources to be in their respective `foo/test` and
`Tests` modules are `ScalaModule`s like any other, and all the same
configuration options apply.
-### Multiple Modules
-
-```scala
-import mill._
-import mill.scalalib._
-object foo extends ScalaModule {
- def scalaVersion = "2.12.4"
-}
-object bar extends ScalaModule {
- def moduleDeps = Seq(foo)
- def scalaVersion = "2.12.4"
-}
-```
-
-You can define multiple modules the same way you define a single module, using
-`def moduleDeps` to define the relationship between them. The above build
-expects the following project layout:
-
-```
-build.sc
-foo/
- src/
- Main.scala
- resources/
- ...
-bar/
- src/
- Main2.scala
- resources/
- ...
-out/
- foo/
- ...
- bar/
- ...
-```
-
-Mill's evaluator will ensure that the modules are compiled in the right order,
-and re-compiled as necessary when source code in each module changes.
-
-Modules can also be nested:
-
-```scala
-import mill._
-import mill.scalalib._
-object foo extends ScalaModule {
- def scalaVersion = "2.12.4"
- object bar extends ScalaModule {
- def moduleDeps = Seq(foo)
- def scalaVersion = "2.12.4"
- }
-}
-```
-
-Which would result in a similarly nested project layout:
-
-```
-build.sc
-foo/
- src/
- Main.scala
- resources/
- ...
- bar/
- src/
- Main2.scala
- resources/
- ...
-out/
- foo/
- ...
- bar/
- ...
-```
### Scala Compiler Plugins