Skip to content

Commit 368fec9

Browse files
committed
generate patch diff for bootstrap
1 parent ebb5971 commit 368fec9

File tree

1 file changed

+91
-1
lines changed

1 file changed

+91
-1
lines changed

ci/mill-bootstrap.patch

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/build.mill b/build.mill
2-
index a4039a6288..c8a686e492 100644
2+
index 4fad3481fa..2f2bfd9e32 100644
33
--- a/build.mill
44
+++ b/build.mill
55
@@ -18,6 +18,7 @@ import mill.define.Cross
@@ -9,3 +9,93 @@ index a4039a6288..c8a686e492 100644
99
+import $packages._
1010
import $file.ci.shared
1111
import $file.ci.upload
12+
13+
@@ -228,12 +229,13 @@ object Deps {
14+
}
15+
}
16+
17+
-def millVersion: T[String] = T { VcsVersion.vcsState().format() }
18+
+def millVersion: T[String] = T { "0.13.0-SCALA3" } //T { VcsVersion.vcsState().format() }
19+
20+
def millLastTag: T[String] = T {
21+
- VcsVersion.vcsState().lastTag.getOrElse(
22+
- sys.error("No (last) git tag found. Your git history seems incomplete!")
23+
- )
24+
+ "0.12.0-RC2"
25+
+ // VcsVersion.vcsState().lastTag.getOrElse(
26+
+ // sys.error("No (last) git tag found. Your git history seems incomplete!")
27+
+ // )
28+
}
29+
30+
def millBinPlatform: T[String] = T {
31+
diff --git a/docs/package.mill b/docs/package.mill
32+
index 8ff6287d88..85472f8bb1 100644
33+
--- a/docs/package.mill
34+
+++ b/docs/package.mill
35+
@@ -127,7 +127,7 @@ object `package` extends RootModule {
36+
os.write.over(dest / "antora.yml", (lines ++ newLines).mkString("\n"))
37+
}
38+
39+
- def githubPagesPlaybookText(authorMode: Boolean) = T.task { extraSources: Seq[os.Path] =>
40+
+ def githubPagesPlaybookText(authorMode: Boolean) = T.task { (extraSources: Seq[os.Path]) =>
41+
val taggedSources = for (path <- extraSources) yield {
42+
s""" - url: ${build.baseDir}
43+
| start_path: ${path.relativeTo(build.baseDir)}
44+
@@ -192,23 +192,23 @@ object `package` extends RootModule {
45+
}
46+
47+
def githubPages: T[PathRef] = T {
48+
- generatePages(authorMode = false)().apply(oldDocSources().map(_.path))
49+
+ generatePages(authorMode = false).apply().apply(oldDocSources().map(_.path))
50+
}
51+
52+
def localPages = T {
53+
- val pages = generatePages(authorMode = true)().apply(oldDocSources().map(_.path))
54+
+ val pages = generatePages(authorMode = true).apply().apply(oldDocSources().map(_.path))
55+
T.log.outputStream.println(
56+
s"You can browse the local pages at: ${(pages.path / "index.html").toNIO.toUri()}"
57+
)
58+
}
59+
def fastPages = T {
60+
- val pages = generatePages(authorMode = true)().apply(Nil)
61+
+ val pages = generatePages(authorMode = true).apply().apply(Nil)
62+
T.log.outputStream.println(
63+
s"You can browse the local pages at: ${(pages.path / "index.html").toNIO.toUri()}"
64+
)
65+
}
66+
67+
- def generatePages(authorMode: Boolean) = T.task { extraSources: Seq[os.Path] =>
68+
+ def generatePages(authorMode: Boolean) = T.task { (extraSources: Seq[os.Path]) =>
69+
T.log.errorStream.println("Creating Antora playbook ...")
70+
// dependency to sources
71+
source()
72+
@@ -217,7 +217,7 @@ object `package` extends RootModule {
73+
val siteDir = docSite / "site"
74+
os.write(
75+
target = playbook,
76+
- data = githubPagesPlaybookText(authorMode)().apply(extraSources),
77+
+ data = githubPagesPlaybookText(authorMode).apply().apply(extraSources),
78+
createFolders = true
79+
)
80+
T.log.errorStream.println("Running Antora ...")
81+
diff --git a/mill-build/build.mill b/mill-build/build.mill
82+
index 356e9306d2..3dcfda144b 100644
83+
--- a/mill-build/build.mill
84+
+++ b/mill-build/build.mill
85+
@@ -4,12 +4,12 @@ import mill.scalalib._
86+
87+
object `package` extends MillBuildRootModule {
88+
override def ivyDeps = Agg(
89+
- ivy"org.scalaj::scalaj-http:2.4.2",
90+
- ivy"de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0",
91+
- ivy"com.github.lolgab::mill-mima::0.1.1",
92+
+ ivy"org.scalaj::scalaj-http:2.4.2".withDottyCompat(scalaVersion()),
93+
+ ivy"de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0".withDottyCompat(scalaVersion()),
94+
+ ivy"com.github.lolgab::mill-mima::0.1.1".withDottyCompat(scalaVersion()),
95+
ivy"net.sourceforge.htmlcleaner:htmlcleaner:2.29",
96+
// TODO: implement empty version for ivy deps as we do in import parser
97+
ivy"com.lihaoyi::mill-contrib-buildinfo:${mill.api.BuildInfo.millVersion}",
98+
- ivy"com.goyeau::mill-scalafix::0.4.1"
99+
+ ivy"com.goyeau::mill-scalafix::0.4.1".withDottyCompat(scalaVersion())
100+
)
101+
}

0 commit comments

Comments
 (0)