summaryrefslogtreecommitdiff
path: root/tools/make-release-notes
blob: dcd206f7fc7c31fe8faed4addf7e663bea19c76b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash

# This tool is used to build a *scaffold* of a release note that you can fill in details with before posting to the list.
# It aims to provide *all* the information you need, and probably need to prune it before releasing.
# Author: jsuereth

fixMessages() {
  local tag1="$1"
  local tag2="$2"
  git log $tag1..$tag2 "--format=format: * %h - %s" --no-merges --grep "SI-"
}

allcommitMessages() {
  local tag1="$1"
  local tag2="$2"
  git log $tag1..$tag2 "--format=format: * %h - %s" --no-merges
}

authors() {
 local tag1="$1"
 local tag2="$2"
 git log $tag1..$tag2 --format=format:%an --no-merges | sort | uniq -c | sort -rh
}


message() {
  local tag1="$1"
  local tag2="$2"

  echo "A new release of Scala is available!  Please point your build tools at ${tag2#v}"
  echo 
  echo "Here's a list of the issues that have been fixed since ${tag1#v}: "
  fixMessages "$tag1" "$tag2"
  echo
  echo
  echo "Special thanks to all the contributions!"
  echo "------- --------------------------------"
  authors "$tag1" "$tag2"
  echo "------- --------------------------------"
  echo
  echo
  echo "Here's a complete list of changes:"
  allcommitMessages "$tag1" "$tag2"
}


message "$1" "$2"