Skip to content

Commit de53f7b

Browse files
committed
update size fetching, hand-written relnotes gen
1 parent f8ebbb9 commit de53f7b

File tree

3 files changed

+5
-43
lines changed

3 files changed

+5
-43
lines changed

hand-written.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,3 @@
1-
Our [benchmarks](https://scala-ci.typesafe.com/grafana/dashboard/db/scala-benchmark?var-branch=2.12.x&from=1501580691158&to=1507711932006) show a further reduction in compile times since 2.12.3 of 5-10%.
1+
[Scala $version](https://github.com/scala/scala/releases/tag/v$version) is now available!
22

3-
We'd like to highlight a few of the excellent contributions by @hrhino and @TomasMikula:
4-
- #5867 Include the parts of a compound/refinement type in implicit scope
5-
- #6074 Resolve implicit instances for abstract types, according to the spec
6-
- #6069 Higher-kinded type variable unification
7-
8-
Improved Java 9 friendliness, with more to come!
9-
- #6097 Fix runtime reflection of empty package members under Java 9
10-
- #6098 Adapt to change in Java 9 classloader hierarchy
11-
12-
For Spark, with love:
13-
- #6101 Make Lazy* classes serializable
14-
15-
Preparing for simplification of named arguments in 2.13:
16-
- #6089 Deprecate assignments in argument position
17-
18-
Rather than pollute `/tmp`,
19-
- #6120 Move compilation daemon portfile under `~/.scalac/`
20-
21-
For more details, check out [all closed bugs](https://github.com/scala/bug/issues?q=is%3Aclosed%20milestone%3A2.12.4) and [merged PRs](https://github.com/scala/scala/pulls?q=is%3Amerged%20milestone%3A2.12.4).
22-
23-
As usual for minor releases, Scala 2.12.4 is binary compatible with the whole Scala 2.12 series.
24-
25-
## Contributors
26-
27-
A big thank you to everyone who's helped improve Scala by reporting bugs, improving our documentation, spreading kindness in discussions around Scala, and submitting and reviewing pull requests! You are all magnificent.
28-
29-
This release was brought to you by 24 contributors, according to `git shortlog -sn --no-merges v2.12.3..v2.12.4`. Thank you, Jason Zaugg, Lukas Rytz, jvican, Adriaan Moors, A. P. Marki, Harrison Houghton, Tomas Mikula, Philippus Baalman, Miles Sabin, Seth Tisue, Dhirendra Kumar Kashyap, Martijn Hoekstra, Martin Grotzke, Martynas Mickevičius, Matt Sicker, Mike, Mike Skells, Rex Kerr, cong, Allison H, Janek Bogucki, Edmund Noble, Jasper Moeys, Kenji Yoshida!
30-
31-
## Scala 2.12 Notes
32-
33-
The [release notes for Scala 2.12.0](https://github.com/scala/scala/releases/v2.12.0) have important information applicable to the whole 2.12 series.
34-
35-
## Obtaining Scala
36-
37-
Scala releases are available through a variety of channels, including (but not limited to):
38-
39-
* Bump the `scalaVersion` setting in your sbt-based project
40-
* Download a distribution from [scala-lang.org](http://scala-lang.org/download/2.12.4.html)
41-
* Obtain JARs via [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.scala-lang%22%20AND%20v%3A%222.12.4%22)
3+
For all the details, refer to the [release notes](https://github.com/scala/scala/releases/tag/v$version) on GitHub.

src/main/scala/MakeDownloadPage.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ class MakeDownloadPage(version: String, releaseDate: Date = new Date()) {
1919
println("## fetching size of "+ url)
2020
scala.util.Try {
2121
val responseHeader = Process(s"curl -m 5 --silent -D - -X HEAD $url").lineStream
22-
val contentLength = responseHeader.find(_.startsWith("Content-Length"))
22+
val contentLength = responseHeader.find(_.toLowerCase.startsWith("content-length"))
2323
val bytes = contentLength.map(_.split(":",2)(1).trim.toInt)
2424
bytes map (b => (responseHeader.head, b))
2525
}.toOption.flatten.map { case (status, bytes) => (status, bytes match {
2626
case meh if meh < 1024 => ""
2727
case kilo if kilo < 1024*1024 => f"${bytes.toDouble/1024}%.0fK"
2828
case big => f"${bytes.toDouble/(1024*1024)}%.2fM"
2929
})} match {
30-
case Some((status, humanSize)) if status.contains("200 OK") || status.contains("302 Found") =>
30+
case Some((status, humanSize)) if status.contains("200") || status.contains("302") =>
3131
humanSize
3232
case _ =>
3333
println(s"## warning: could not fetch $url")

src/main/scala/MakeReleaseNotes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object MakeReleaseNotes {
8282
val newLines = lines.map(x => if (x.startsWith(" *")) "\n" + x.stripPrefix(" ") else x)
8383
val bulletFixed = newLines.mkString("\n")
8484
val commentsStripped = stripTripleDashedHtmlComments(bulletFixed)
85-
commentsStripped
85+
commentsStripped.replaceAll("\\$version", version)
8686
}
8787
val info = new GitInfo(scalaDir, previousTag, currentTag)
8888
// val communityProjects = CommunityProjects.loadHtmlFromFile()

0 commit comments

Comments
 (0)