diff options
author | Robby <robby@santoslab.org> | 2018-04-07 08:23:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-07 08:23:42 -0500 |
commit | ccb67db3759a16e95a75920d87281185310ccd81 (patch) | |
tree | b901d0173eaf48489583c9a905914baaaf3486ab /build.sc | |
parent | e628c84be7cf0b7bb00ba2141635d29503203fc4 (diff) | |
download | mill-ccb67db3759a16e95a75920d87281185310ccd81.tar.gz mill-ccb67db3759a16e95a75920d87281185310ccd81.tar.bz2 mill-ccb67db3759a16e95a75920d87281185310ccd81.zip |
Merge April 1 - 4, 2018 changes on master (#283)
* fix build
* Detect sh/batch launcher, dev.assembly, and release filename.
* Updated appveyor cache.
* Added some entries for master in readme.md changelog.
* Updated readme.md changelog.
* fixes #173; use default(compile) configuration for deps as default (#270)
* revert #254 to fix bootstrapping https://github.com/lihaoyi/mill/issues/268
* Updated ci tests.
* Reverted Ammonite caching workaround (a796f0a) now that it's fixed
* Changed ci/test-mill-0.sh to use interactive mode due to intermittent client failures to connect to server in travis
* Added ci/test-mill-bootstrap.sh (ci/test-mill-0.sh with bootstrapping) and use it on oraclejdk9 instead of ci/test-mill-0.sh
* Upgraded mill used for ci to 0.1.7-29-f5097f
* revive #254 and fix #268 (#274)
* Test mill batch (.bat) in AppVeyor
* fix minor typos in docs
* Sync Ammonite in ScalaModule (with build.sc).
Diffstat (limited to 'build.sc')
-rwxr-xr-x | build.sc | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -258,6 +258,13 @@ def launcherScript(jvmArgs: Seq[String], ) } +val isBatch = + scala.util.Properties.isWin && + !(org.jline.utils.OSUtils.IS_CYGWIN + || org.jline.utils.OSUtils.IS_MINGW + || "MSYS" == System.getProperty("MSYSTEM")) + + object dev extends MillModule{ def moduleDeps = Seq(scalalib, scalajslib) def forkArgs = T{ @@ -265,7 +272,7 @@ object dev extends MillModule{ } def launcher = T{ val isWin = scala.util.Properties.isWin - val outputPath = T.ctx().dest / "run" + val outputPath = T.ctx().dest / (if (isBatch) "run.bat" else "run") write(outputPath, prependShellScript()) @@ -280,7 +287,7 @@ object dev extends MillModule{ } def assembly = T{ - val filename = "mill" + val filename = if (isBatch) "mill.bat" else "mill" mv(super.assembly().path, T.ctx().dest / filename) PathRef(T.ctx().dest / filename) } @@ -307,29 +314,21 @@ object dev extends MillModule{ } } -private def releaseHelper(dest: Path, - cp: Agg[Path], - ver: String) - (implicit ctx: mill.util.Ctx.Dest): PathRef = { +def release = T{ + val dest = T.ctx().dest + val filename = if (isBatch) "mill.bat" else "mill" mv( createAssembly( - cp, + dev.runClasspath().map(_.path), prependShellScript = launcherScript( - Seq("-DMILL_VERSION=" + ver), + Seq("-DMILL_VERSION=" + publishVersion()._2), Agg("$0"), Agg("%~dpnx0") ) ).path, - dest / "mill" + dest / filename ) - PathRef(dest / "mill") -} - -def release = T{ - releaseHelper( - T.ctx().dest, - dev.runClasspath().map(_.path), - publishVersion()._2) + PathRef(dest / filename) } val isMasterCommit = { |