diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/get-scala-commit-date | 3 | ||||
-rwxr-xr-x | tools/get-scala-commit-drift | 40 | ||||
-rw-r--r-- | tools/get-scala-commit-drift.bat | 21 | ||||
-rwxr-xr-x | tools/get-scala-commit-sha | 26 | ||||
-rw-r--r-- | tools/get-scala-commit-sha.bat | 2 | ||||
-rwxr-xr-x | tools/make-release-notes | 49 |
6 files changed, 54 insertions, 87 deletions
diff --git a/tools/get-scala-commit-date b/tools/get-scala-commit-date index ef5b0f540d..b2e4e10770 100755 --- a/tools/get-scala-commit-date +++ b/tools/get-scala-commit-date @@ -11,6 +11,7 @@ [[ $# -eq 0 ]] || cd "$1" lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1) +lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2) # 20120324 -echo "${lastcommitdate//-/}" +echo "${lastcommitdate//-/}-${lastcommithours//:/}" diff --git a/tools/get-scala-commit-drift b/tools/get-scala-commit-drift deleted file mode 100755 index 4959826ec1..0000000000 --- a/tools/get-scala-commit-drift +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -# -# Usage: get-scala-commit-drift [dir] -# Figures out current commit drift of a git clone. -# If no dir is given, current working dir is used. -# -# Example output string: -# 123 -# -# Build drift = # of commits since last tag. - -[[ $# -eq 0 ]] || cd "$1" - -ensure_tag () { - sha=$1 - rev=$2 - - [[ -n $(git tag -l $rev) ]] || { - git tag -a -m "generated by get-scala-revision" $rev $sha - } -} - -# Ensure some baseline tags are present so if this repository's -# tags are screwed up or stale, we should still have a reference -# point for a build string. -ensure_tag 58cb15c40d v2.10.0-M1 -ensure_tag 29f3eace1e v2.9.1 -ensure_tag b0d78f6b9c v2.8.2 - -# the closest tag, obtained separately because we have to -# reconstruct the string around the padded distance. -tag=$(git describe --tags --match 'v2*' --abbrev=0) - -# printf %016s is not portable for 0-padding, has to be a digit. -# so we're stuck disassembling it. -described=$(git describe --tags --match 'v2*' --abbrev=10) -suffix="${described##${tag}-}" -counter=$(echo $suffix | cut -d - -f 1) - -echo "$counter" diff --git a/tools/get-scala-commit-drift.bat b/tools/get-scala-commit-drift.bat deleted file mode 100644 index ac289d3481..0000000000 --- a/tools/get-scala-commit-drift.bat +++ /dev/null @@ -1,21 +0,0 @@ -@echo off -rem -rem Usage: get-scala-commit-drift.bat [dir] -rem Figures out current scala commit drift, of a clone. -rem -rem If no dir is given, current working dir is used. - -@setlocal -set _DIR= -if "%*"=="" ( - for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" -) else ( - set "_DIR=%~1" -) -cd %_DIR% - -rem TODO - WRITE THIS -echo "TODO" - -:end -@endlocal diff --git a/tools/get-scala-commit-sha b/tools/get-scala-commit-sha index 0abe31a53c..eab90a4215 100755 --- a/tools/get-scala-commit-sha +++ b/tools/get-scala-commit-sha @@ -10,31 +10,9 @@ [[ $# -eq 0 ]] || cd "$1" -ensure_tag () { - sha=$1 - rev=$2 - - [[ -n $(git tag -l $rev) ]] || { - git tag -a -m "generated by get-scala-revision" $rev $sha - } -} - -# Ensure some baseline tags are present so if this repository's -# tags are screwed up or stale, we should still have a reference -# point for a build string. -ensure_tag 58cb15c40d v2.10.0-M1 -ensure_tag 29f3eace1e v2.9.1 -ensure_tag b0d78f6b9c v2.8.2 - -# the closest tag, obtained separately because we have to -# reconstruct the string around the padded distance. -tag=$(git describe --tags --match 'v2*' --abbrev=0) - # printf %016s is not portable for 0-padding, has to be a digit. # so we're stuck disassembling it. -described=$(git describe --tags --match 'v2*' --abbrev=10) -suffix="${described##${tag}-}" -hash=$(echo $suffix | cut -d - -f 2) +hash=$(git log -1 --format="%H" HEAD) hash=${hash#g} - +hash=${hash:0:10} echo "$hash" diff --git a/tools/get-scala-commit-sha.bat b/tools/get-scala-commit-sha.bat index 80d9aa34b1..7a5afa11b1 100644 --- a/tools/get-scala-commit-sha.bat +++ b/tools/get-scala-commit-sha.bat @@ -15,7 +15,7 @@ if "%*"=="" ( cd %_DIR% rem TODO - truncate chars. -git log -1 --format="%T" +git log -1 --format="%H :end @endlocal diff --git a/tools/make-release-notes b/tools/make-release-notes new file mode 100755 index 0000000000..dcd206f7fc --- /dev/null +++ b/tools/make-release-notes @@ -0,0 +1,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" + + |